fordFull-Text and Secondary Index engine over Redis
4 index types
Text
Numeric
Tag
Geospatial
Hashes indexed automatically (RediSearch 2.0)
Search
Aggregate
Delete documents as needed
Drop the whole index
Intentionally not SQL
Familiar
Exposable to end-users
No knowledge of data structures needed
With knowledge, zero in on data
fordford | chev*(ford | chev*) -explorer(ford | chev*) -explorer ~truck(ford | chev*) -explorer ~truck %raptur%(ford | chev*) -explorer ~truck %raptur%
@year:[2001 2011](ford | chev*) -explorer ~truck %raptur%
@year:[2001 2011]
@location:[-77.02 38.78 10 mi](ford | chev*) -explorer ~truck %raptur%
@year:[2001 2011]
@location:[-77.02 38.78 10 mi]
@condition:{good | very good}"a fox in the woods" → "fox woods"
"going" → "going" "go" "gone"
"glass pitcher", slop 2 → "glass gallon beer pitcher"
"To be or not to be" → Hamlet (without the whole play)
"To be or not to be" → <b>To be, or not to be</b> that is the question
"Bob" → Find documents with "Robert"
"a fxo in the woods" → Did you mean "a fox in the woods"
"John Smith" → "Jon Smyth"
Each field can have a weight which influences the rank in the returned result
Each document can have a score to influence rank
Default: TF-IDF
Variant: DOCNORM
Variant: BM25
DISMAX (Solr’s default)
DOCSCORE
HAMMING for binary payloads
Process/transform
Same query language as search
Can group, sort and apply transformations
Follows pipeline of composable actions
COUNT | COUNT_DISTINCT | COUNT_DISTINCTISH |
SUM | MIN | MAX | AVG | STDDEV | QUANTILE |
TOLIST | FIRST_VALUE | RANDOM_SAMPLE |
substr(upper('hello'),0,3)
→ HEL
sqrt(log(foo) * floor(@bar/baz)) + (3^@qaz % 6)
timefmt(@time, "%b %d %Y %H:%M”)
→ Feb 24 2018 00:05
FT.AGGREGATE shipments "@box_area:[300 +inf]"
APPLY "year(@shipment_timestamp / 1000)" AS shipment_year
GROUPBY 1 @shipment_year REDUCE COUNT 0 AS shipment_count
SORTBY 2 @shipment_count DESC
LIMIT 0 3
APPLY "format(\"%sk+ Shipments\",floor(@shipment_count / 1000))"
AS shipment_countaka Suggestions
in the module but separate storage
Optimized for real-time, as-you-type completions
FT.SUGADD — add a suggestion
FT.SUGGET — get a suggestion
FT.SUGDEL — delete a suggestion

