Index and search data in Flex databases
Store Redis Search indexes on flash in Flex databases on Redis Software.
| Redis Software |
|---|
Redis Search on Flex stores search indexes on flash in a Flex database, so large indexes don't need to fit in RAM. You use the same Redis Search commands and client libraries as you do with an in-memory database.
Redis Search on Flex is in preview and supports a subset of Redis Search features. See Supported features and Limitations.
Requirements
To use Redis Search on Flex, you need:
-
Redis Software cluster version 8.2.6 or later, with flash storage enabled
-
Redis database version 8.8 or later
-
A new Flex database. You can turn on Redis Search on Flex only when you create the database. You can't add it to an existing Flex database or turn it off later.
Create a database with Redis Search on Flex
To create a Flex database with Redis Search on Flex, send a create database REST API request with bigstore and search_on_bigstore set to true:
POST /v1/bdbs
{
"name": "<database-name>",
"memory_size": <memory-limit-in-bytes>,
"bigstore": true,
"redis_version": "8.8",
"search_on_bigstore": true
}
After you create the database, create indexes with FT.CREATE and query them with FT.SEARCH.
Supported features
Redis Search on Flex supports:
-
HASH documents, and JSON documents without multi-value fields
-
TEXT,TAG,NUMERIC,GEO, andVECTORfields -
HNSWvector indexes withFLOAT32andFLOAT16vectors. When you create anHNSWvector field, you must set theM,EF_CONSTRUCTION,EF_RUNTIME, andRERANKattributes.RERANKacceptsTRUEorFALSE. -
Loading fields from the keyspace with the
SORTBYandRETURNoptions ofFT.SEARCH
Limitations
Redis Search on Flex doesn't support some Redis Search commands, field types, and options. If you use one of them, the command returns an error.
Commands
Redis Search on Flex doesn't support:
-
FT.ALTER. To change an index schema, drop the index and create it again. -
FT.HYBRIDandFT.TAGVALS. -
The
DDoption ofFT.DROPINDEX. -
Cursors, including
FT.CURSOR READ,FT.CURSOR DEL, and theWITHCURSORoption ofFT.AGGREGATE. -
Synonyms:
FT.SYNUPDATEandFT.SYNDUMP. -
Spell check and dictionaries:
FT.SPELLCHECK,FT.DICTADD,FT.DICTDEL, andFT.DICTDUMP. -
Autocomplete suggestions:
FT.SUGADD,FT.SUGGET,FT.SUGDEL, andFT.SUGLEN.
Field types and index options
Redis Search on Flex doesn't support:
-
GEOSHAPEfields. -
FLATandSVS-VAMANAvector indexes. UseHNSWinstead. -
FLOAT64,BFLOAT16,INT8, andUINT8vectors. UseFLOAT32orFLOAT16instead. -
The
WITHSUFFIXTRIEoption onTEXTandTAGfields. -
The
NOINDEX,SORTABLE, andUNFfield options. -
FT.CREATEoptions other thanON,PREFIX,FILTER,LANGUAGE,LANGUAGE_FIELD,SCORE,SCORE_FIELD,STOPWORDS, andSKIPINITIALSCAN.
Query options
Redis Search on Flex doesn't support:
-
Prefix, suffix, infix, and wildcard queries on
TAGfields. -
The
SUMMARIZE,HIGHLIGHT,WITHOUTCOUNT,SLOP, andINORDERoptions ofFT.SEARCH. -
DIALECT 4. -
The
HAMMINGscorer, which requires document payloads.
Filtered vector queries must set a filter mode with HYBRID_POLICY. Redis Search on Flex doesn't select one automatically.
Behavior differences
-
Hash field expiration isn't reflected in the index or in query results.
-
In
FT.AGGREGATE, numeric values from fields that aren't in the index schema sort as strings. To sort them numerically, convert them withAPPLY to_number(@<field>).
Database limitations
The following database limitations also apply:
-
Active-Active databases are not supported.
-
Replica Of and import work only from another Flex database.
-
Cold restart isn't supported for keys stored on flash. Use database replication for high availability.
Plan memory and performance
Redis Search on Flex keeps some index data in RAM, even when the index is stored on flash. Plan for more RAM than a Flex database of the same size without search indexes. The number of indexes, the number of fields in each index, your query patterns, and your read and write mix all affect how much RAM and CPU you need.
The RAM-to-flash ratio affects search performance the same way it affects other Flex workloads. More RAM increases throughput and lowers latency. Set it to at least 20% RAM for databases that use Redis Search on Flex.
Configure the query performance factor for databases that use Redis Search on Flex. Reading index data from flash adds latency, and the query performance factor offsets it by running queries on more CPUs.