RediSearch 2.0 Release Notes
RediSearch 2.0 (September, 2020)
RediSearch 2.0 is a public preview release meeting GA standards. This release includes several improvements in performance and usability over RediSearch 1.0. These improvements necessitate a few backward-breaking changes to the API.
For this release, we changed the way in which the search indexes are kept in sync with your data. In RediSearch 1.x, you had to manually add data to your indexes using the
FT.ADD command. In RediSearch 2.x, your data is indexed automatically based on a key pattern.
These changes are designed to enhance developer productivity, and to ensure that your search indexes are always kept in sync with your data. To support this, we’ve made a few changes to the API.
In addition to simplifying indexing, RediSearch 2.0 allows you to scale a single index over multiple Redis shards using the Redis cluster API.
Finally, RediSearch 2.x keeps its indexes outside of the main Redis key space. Improvements to the indexing code have increased query performance 2.4x.
- When you create an index, you must specify a prefix condition and/or a filter. This determines which hashes RediSearch will index.
- Several RediSearch commands now map to their Redis equivalents:
FT.DELwith the DD flag in RediSearch 1.x),
- RediSearch indexes no longer reside within the key space, and the indexes are no longer saved to the RDB.
- You can upgrade from RediSearch 1.x to RediSearch 2.x.
- #1394: Expired documents (TTL) will be removed from the index.
- #1394: Optimization to avoid reindexing documents when non-indexed fields are updated.
- After index creation, an initial scan starts for existing documents. You can check the status of this scan by calling
FT.INFOand looking at the
indexingis true, queries return partial results.
FT.CREATEto skip the initial scan of documents on index creation.
- #1401: Support upgrade from v1.x and for reading RDB’s created by RediSearch 1.x (more information).
- #1445: Support for load event. This event indexes documents when they are loaded from RDB, ensuring that indexes are fully available when RDB loading is complete (available from Redis 6.0.7 and above).
FT.DROPINDEX, which by default does not delete documents underlying the index (see deprecated
- #1385: Add index definition to
- #1097: Add Hindi snowball stemmer.
FT._LISTcommand returns a list of all available indices. Note that this is a temporary command, as indicated by the
_in the name, so it’s not documented. We’re working on a
SCAN-like command for databases with many indexes.
- The RediSearch version will appear in Redis as
20000, which is equivalent to 2.0.0 in semantic versioning. Since the version of a module in Redis is numeric, we cannot explicitly add an GA flag.
- RediSearch 2.x requires Redis 6.0 or later.
Please familiarize yourself with these changes before upgrading to RediSearch 2.0:
FT.SYNADDis removed; use
FT.SYNUPDATErequires both and index name and a synonym group ID. This ID can be any ASCII string.
- #1437: Documents that expire during query execution time will not appear in the results (but might have been counted in the number of produced documents).
- #1221: Synonyms support for lower case. This can result in a different result set on FT.SEARCH when using synonyms.
- RediSearch will not index hashes whose fields do not match an existing index schema. You can see the number of hashes not indexed using
hash_indexing_failures. The requirement for adding support for partially indexing and blocking is captured here: #1455.
- Removed support for
NOSAVE(for details see v1.6 docs).
- RDB loading will take longer due to the index not being persisted.
- Field names in the query syntax are now case-sensitive.
- Deprecated commands:
FT.DROPINDEX, which by default keeps the documents)
HSETfor backward compatibility)
DELfor backward compatibility)
HGETALLfor backward compatibility)
HGETALLfor backward compatibility)
- Removed commands: