Repository navigation
Valkey Search 1.3.0 GA - Released Wed Nov 18th 2026
This is the general availability release of Valkey Search 1.3. It adds BM25STD relevance scoring for full-text queries; FT.HYBRID, which fuses the rankings of a text, tag or numeric query and a vector search over one index into a single result list; full-text search in 11 languages besides English; vector range queries; cursors for paging through large result sets; FLOAT16 and BFLOAT16 vector types; and new FT.AGGREGATE reducers and functions. It also brings major memory savings: vectors in HASH documents are now stored once and shared between the Valkey keyspace and the search indexes instead of being duplicated, and the numeric and tag indexes were redesigned to use less memory. This release requires Valkey core 9.1.0 or higher.
1.3 also includes bug and compatibility fixes from more than 50 pull requests, covering server crashes, hangs and deadlocks, memory corruption, incorrect query results, RDB load and save failures, and cluster-mode errors. Several of the compatibility fixes are breaking changes, so they are off by default; set search.emulate-release to 1.3.0 to enable them. See Known Compatibility Defect Corrections. The search_compatibility_usage INFO field reports how often each legacy behavior has been used; it replaces the search_compatibility-* INFO fields of the release candidates.
Upgrade notes
- The minimum Valkey core version is now 9.1.0 (1.2 required 9.0.1)
- 1.2.x cannot load an RDB file that contains an index using FLOAT16 or BFLOAT16 vectors,
FILTER, or aLANGUAGEother than English. In a cluster, upgrade every node before creating such indexes or using other features new in 1.3 - The
search_vector_externing_*INFO fields are removed; vector sharing is reported by thesearch_vector_registry_*fields (#1316) FT._DEBUGno longer requires debug mode; it is in the@search,@slow,@adminand@dangerousACL categories, so a user granted@searchcan run it. Restrict it with ACLs where needed (#914)- FT.SEARCH results without
SORTBYare now ranked by relevance score. Non-vector queries, whose results 1.2 did not rank (in cluster mode they came back in key order), are ordered by score with ties in key order; a KNN query filtered by text or tag clauses, which 1.2 returned in distance order, now ranks its K nearest documents by that score. AddSORTBYfor a fixed order (#1287, #1490)
New Features
Major features:
- BM25STD text scoring: full-text results are ranked by relevance with BM25STD, including prefix, suffix, fuzzy, tag prefix and stemmed terms. Adds
WITHSCORES, theSCORERoption and thesearch.default-scorerconfig,$weightquery attributes,ADDSCORESon FT.AGGREGATE, and per-document scores through the newSCORE_FIELDoption on FT.CREATE;SCOREnow accepts any value from 0.0 to 1.0 (#1287, #1350, #1354, #1345, #1400, #1008) - FT.HYBRID score fusion: the new FT.HYBRID command runs two searches over one index, a
SEARCHarm (a text, tag or numeric query, scored for relevance as in FT.SEARCH) and aVSIMarm (a vector similarity search, scored by distance), ranks each independently, and fuses the two ranked lists into one withRRF,LINEARor a customFUNCTION. Unlike a filtered vector query in FT.SEARCH, where the text, tag or numeric clauses only narrow the KNN results, both arms contribute to the final ranking: a document found by both arms gets a contribution from each, and theCOMBINEclause sets how the two arms' scores are weighed against each other. The fused results pass through the FT.AGGREGATE processing stages (#1083) - Shared vector memory: vectors in HASH documents are stored once and shared between Valkey and every index that uses them, instead of being duplicated in each index. Enabled by default and controlled by the
--enable-vector-sharingmodule argument; reported by thesearch_vector_registry_*INFO fields;search.vector-unshare-batch-sizesets how many vectors are copied back to the keyspace per cron tick after FT.DROPINDEX (#1168, #1232, #1316, #1325, #1487) - Search and aggregation cursors:
WITHCURSOR [COUNT <count>] [MAXIDLE <ms>]on FT.SEARCH, FT.AGGREGATE and FT.HYBRID, and the newFT.CURSOR READandFT.CURSOR DELcommands, for paging through large result sets. Limits are set bysearch.cursor-max-countandsearch.cursor-max-idle-ms, and open cursors are reported bysearch_num_cursors(#1394) - FLOAT16 and BFLOAT16 vectors: new vector element types for FLAT and HNSW indexes, across all distance metrics, for HASH and JSON documents, roughly halving the memory used per vector (#1001)
- Multi-language full-text search: TEXT fields can be indexed in 12 Snowball stemmer languages, chosen per index with the
LANGUAGEoption on FT.CREATE: English, French, German, Spanish, Italian, Portuguese, Russian, Swedish, Turkish, Dutch, Indonesian and Arabic. Each language has its own tokenization, normalization, stop words and stemming (#1263) - Vector range queries:
@field:[VECTOR_RANGE <radius> $blob]in FT.SEARCH and FT.AGGREGATE queries returns the documents whose vector is within<radius>, optionally with each distance through$YIELD_DISTANCE_AS, and can be combined with other query clauses using AND, OR and negation. On HNSW fields the result is approximate, andEF_RUNTIMEand$EPSILONcontrol how widely each query searches. Each shard keeps at mostsearch.max-nonvector-search-results-fetchedmatches (default 100000), not necessarily the nearest, and silently drops the rest; thesearch_vector_range_results_fetched_limited_countINFO field counts, per shard, the queries that dropped matches (#985, #1546)
Other new features:
FILTERoption on FT.CREATE: a boolean expression evaluated during ingestion so that only matching keys are indexed. FT.INFO counts rejections infilter_rejected_keys(#984)INKEYSoption on FT.SEARCH to restrict results to a given set of keys (#967)- Filtered KNN execution strategy: a KNN query with a filter can now select how the filter and the vector search are combined, instead of leaving it to the planner. The
HYBRID_POLICYoption only controls filtered KNN execution and is unrelated to FT.HYBRID score fusion.HYBRID_POLICY ADHOC_BFevaluates the filter first and computes exact distances for the matching documents, andHYBRID_POLICY BATCHESsearches the vector index first and applies the filter inline. Both are set inside the KNN clause of FT.SEARCH and FT.AGGREGATE queries; FT.HYBRID takesPOLICY ADHOCorPOLICY BATCHESinside a countedVSIM FILTER, where it applies to theVSIMarm's filter (#1460) - FT.AGGREGATE enhancements: the
TOLIST,FIRST_VALUE,RANDOM_SAMPLE,COUNT_DISTINCTISHandQUANTILEreducers (COUNT_DISTINCTISHandQUANTILEare approximate); thecase()function; array values in expressions, with element-wise arithmetic;GROUPBYover multi-value fields, bounded bysearch.max-group-key-expansion; and JSON paths andASaliases inLOAD(ASrequiressearch.emulate-release1.3.0) (#932, #946, #949, #893, #1271, #1084, #1719, #1721, #1433) - More query and index syntax is accepted: field-scoped groups such as
@title:(hello | world), indexing one field under two aliases (for example as both TEXT and TAG), theNOHLandSORTABLE UNFoptions on FT.CREATE, withSORTABLEandUNFreported for each attribute by FT.INFO, andSORTBYon a KNN score alias in ascending order (#1218, #1196, #1395, #1267) - In cluster mode, FT.SEARCH and FT.AGGREGATE can run inside MULTI/EXEC or Lua scripts when the index is single-slot (hash-tagged) and the local node owns that slot (#866)
- Compatibility framework: the new
search.emulate-releaseconfig selects which release's behavior to emulate, so compatibility fixes can ship in minor and patch releases without changing default behavior. Thesearch_compatibility_usageINFO field reports how often each legacy behavior has been used, andCOMPATIBILITY.mddocuments the compatibility contract (#1063, #981, #1059, #1386, #1729) - Resource protection: queries are rejected before fan-out when the reader queue exceeds
search.max-query-queue-depth(default 100000, 0 disables the check), and queries that are already cancelled are dropped before they run;search.max-timeout-mscaps theTIMEOUTa query may request (default and maximum 60000); and queued mutations reserve memory in proportion to their expected index size, so maxmemory checks account for pending ingestion (#1276, #1368, #934) search.debug-modecan now be changed at runtime withCONFIG SET; developer configs in the config file are accepted at load regardless of debug mode. Developer-only configurations are intended for testing and are not a supported operating mode (#1485)- The cluster coordinator supports IPv6 node addresses (#759)
- The
search_coordinator_server_search_index_partition_cpu_time_usecINFO field reports the CPU time a node spends handling queries fanned out from other nodes (#923)
Optimizations
- Reimplemented the numeric index as an order-statistic B+ tree, using up to 2.4x less memory for high-cardinality fields, with faster inserts, deletes and range counts (#1030)
- Reimplemented the tag index on a radix (rax) tree, using 81% to 89% less memory than 1.2 in benchmarks (#1031)
- FT.AGGREGATE queries that return no document content skip an unnecessary revalidation step on the main thread (#1400)
- Filtering and scoring share a per-query cache of resolved text terms and tag values, so each is looked up once per query instead of once per candidate document, which speeds up queries that combine text, tag or numeric clauses (#1472)
- Large internal hash tables now grow incrementally instead of rehashing all at once, removing main-thread stalls of up to about 2 seconds during bulk ingestion (#1622)
- With Valkey core 9.2 or higher, vector index memory and large internal hash tables are allocated in 2 MB regions requested as transparent huge pages, unless those are disabled for the process or host;
search.vector-chunk-huge-pages(defaultyes) controls this for vector index memory. Vector memory is then counted in 2 MB units, so after most keys of a FLAT index are deleted,used_memorystays near its peak until new vectors reuse the space (#1622, #1647)
Bug fixes
- Fixed server crashes and hangs in FT.AGGREGATE expressions:
APPLYof a string function (lower,upper,strlen,startswith,contains,substr,concat,timefmt,parsetime) on a missing value aborted the server, andtimefmtcould loop forever on a format that produces no output. A TEXT field is now also accepted as anAPPLYoperand (#963, #1086, #1366) - Fixed memory corruption when an FT.AGGREGATE alias was reused for a different field (#1273)
- Fixed deadlocks and crashes around forks and thread pools: a permanent main-thread deadlock when FT.SEARCH drained the MULTI/EXEC mutation queue during BGSAVE, AOF rewrite or a replica full sync; and a crash when a thread pool was resized during a fork (#1292, #1331)
- Fixed a crash in the latency sampler when histogram allocation fails under memory pressure (#1230)
- Fixed vector crashes and hangs: a worker thread could crash when several threads used the same distance function for the first time at once, and on aarch64 a writer thread could hang when an HNSW insert computed a NaN distance. The module is no longer built with
-ffast-math, so distances can differ from 1.2 in the last digits (#1396, #1542) - FLAT vector indexes no longer restart their internal ids after an RDB load (restart, replica full sync or restore); in 1.2.1, a key added after the load overwrote a loaded key's vector, so KNN queries could return the wrong key (#985)
- Fixed HNSW issues: RDB load failing for a small index whose top level exceeds its element count; RDB load validation rejecting duplicate labels left behind by concurrent updates and deletes, which are now handled on load; insertion failures among deleted (tombstoned) nodes, including recovery from a deleted entry point; and prefetches that could read invalid neighbor ids from empty neighbor lists (#1349, #1283, #1362, #1320)
- Keys whose name is the empty string are now indexed (#1171, #1310)
- FT.SEARCH fixes:
SORTBYon an attribute renamed withASnow sorts by that attribute,SORTBYwithNOCONTENTnow returns sorted results in standalone and cluster mode, a bare*query runs as a match-all search instead of failing with a syntax error,PARAMSsubstitution now applies to theASalias of a KNN score, and a query whosePARAMSinclude a parameter it does not reference is no longer rejected, matching FT.AGGREGATE (#1579, #1217, #960, #1090, #1407) - FT.AGGREGATE fixes: fields referenced only by
GROUPBY,REDUCE,SORTBY,APPLYorFILTERare now loaded automatically instead of silently evaluating as missing, except underLOAD *on JSON belowsearch.emulate-release1.3.0; numeric values keep full precision inGROUPBYkeys and vector query results instead of being rounded to 6 significant digits;GROUPBY 0is now accepted, reducing all records into a single group; andVERBATIM,INORDERandSLOPare now applied instead of ignored (#1341, #1264, #1464, #1606) - Numeric fields now treat every spelling of NaN, such as
-nanornan(1), as invalid data; previously such a value could not be removed from the index when its key was deleted.SORTBYin FT.SEARCH and FT.AGGREGATE places NaN values after every number (#1554) - FT.SEARCH and FT.AGGREGATE text queries that run on the main thread (inside MULTI/EXEC or a Lua script) now wait for in-flight indexing of their result keys before revalidating them, bounded by the query's
TIMEOUT, and return the timeout error past that. Previously they could return a document that no longer matched, or drop one that did (#1610) - KNN queries whose filter is applied inline during the HNSW search (chosen by the planner, or forced with
HYBRID_POLICY BATCHES) now check text terms joined by AND; previously documents that did not match them could be returned (#1680) - Fixed a race with concurrent writes in stemmed indexes: a word deleted from one key while another key added it could be dropped from its stem's word list, so stemmed queries could miss documents holding that word (#1436)
- Text queries checked one document at a time, such as a stemmed word combined with numeric or tag clauses, now match documents that contain only another form of the word; previously only the word as written or its stem root matched (#1472)
- Text tokenization fixes: a multi-byte character in
PUNCTUATION, such as the em dash (--), is now matched as a whole character (matching byte by byte also split words at unrelated characters sharing those bytes); and in English indexes, non-ASCII words are Unicode-normalized (NFC) before case folding, so composed and decomposed forms of the same accented letter match (#1263) - FLUSHALL now drops the indexes of every database. Previously only the indexes of database 0 were dropped, so indexes in other databases kept returning the flushed keys and could not be recreated under the same name (#1404)
- Cluster fixes: query results exclude keys in slots the node does not own, avoiding double counting during slot migration; HNSW KNN queries that omit
EF_RUNTIMEnow use the index'sEF_RUNTIMEon remote shards too, instead of an EF of K that could lower recall; indexes in a non-zero database no longer fail with a slot fingerprint mismatch after an RDB load; and a node demoted to replica while fetching index metadata no longer applies it (#921, #1460, #1259, #1304) - In cluster mode, a node no longer rejects index metadata from other nodes as requiring a newer module version once the metadata revision, which grows with every index creation and deletion, exceeds the module's packed version number. The check now compares the metadata's minimum required module version (#1447)
- Fixed an abort during RDB save when a key queued by MULTI/EXEC no longer had a pending mutation; such keys are now skipped (#1361)
- Writes still queued from MULTI/EXEC or a Lua script are now indexed before the server forks for BGSAVE, AOF rewrite or a replica full sync, instead of being saved for the loading node to index (#1659)
- The
search_number_of_indexesINFO field is now correct: a stale RDB restore counter no longer inflates it, and replicas report the right count after a full sync (#1312, #1265) - Fixed a memory leak on every RDB load, and index schemas are now freed asynchronously even if recreating them fails after FLUSHDB (#941, #1204)
- Reworked the module's memory allocation so that the module and the libraries statically linked into it allocate through Valkey's allocator, removing a class of allocator-mismatch heap corruption; libstdc++ is now linked statically (#1360)
- Fixed musl-only (Alpine) crashes, including a crash in INFO and crashes during shutdown (#1402)
- A startup log message emitted at WARNING for every INFO field is now logged at DEBUG (#1281)
--debug-modeis now applied before the other module arguments, so developer configs passed as module arguments load in any order (#1562)- Compatibility fixes, enabled by setting
search.emulate-releaseto1.3.0(#1155, #971, #1084, #1086, #1271, #1366, #1373, #1364, #1445, #1389, #1263, #1075, #1536, #1528, #1381, #1700):- A key with a malformed NUMERIC, VECTOR or TAG value (TAG values must be valid UTF-8) is dropped from the index entirely; previously the NUMERIC or VECTOR field was skipped and the TAG value was indexed
- FT.AGGREGATE: reducers without
ASare named as in Redis (__generated_alias...) instead ofREDUCER(args);LOADhonorsAS; output columns of JSON indexes are named as written in the query; division by zero, the precedence of^and&&, empty strings,SUM,AVG,MINandMAXover empty or non-numeric input, and references to missing fields follow the corrected behavior; and aLIMITnext toSORTBYraises theSORTBYbound, so paging past the first 10 sorted rows works - FT.AGGREGATE expressions are typed as in Redis 8: a comparison compares numbers when either operand is a number, and otherwise strings when either is a string, and
<,<=,>or>=between a number and a non-numeric string is an error;&&and||evaluate their right operand only when needed;strlen,startswith,containsandsubstrreject numbers; and aPARAMSvalue that reads as a number is a number. In FT.AGGREGATE on HASH indexes, a NUMERIC field fetched only byLOAD *keeps its stored string value - FT.AGGREGATE with
LOAD *also fetches the fields named in otherLOADclauses and the fields that later stages read, so on JSON indexes those stages see the fields - FT.SEARCH: an unescaped
'delimits a phrase;WITHSORTKEYSprefixes string sort keys with$and returns nil for documents without a sort key; and only the lastRETURNclause applies - Expression functions: non-empty strings are truthy;
lowerandupperreturn nil for non-string arguments; numeric functions return NaN for non-numeric strings;month()rounds correctly; andparsetime,timefmtand the date functions return nil for invalid input - A query containing malformed UTF-8 is rejected; and on English indexes,
MINSTEMSIZEand fuzzy edit distance count characters (Unicode code points) instead of bytes, as other languages always do
- Improvements to tests and test infrastructure with no corresponding module code changes.
Contributors
@adam-fowler, @affonsov, @Aksha1812, @alexey-temnikov, @AlexFilipImproving, @allenss-amazon, @bandalgomsu, @baswanth09, @BCathcart, @bluayer, @boda26, @bogdanp05, @Carol-ggg, @Frank-Gu-81, @hjkwon0, @JasonLi314, @KarthikSubbarao, @linbran5123, @madolson, @mohanrajendran, @neerajr0, @Nivesh-01, @pjschlic, @rayjinghaolei, @rileydes-improving, @Shikha-code36, @txchmechanicus, @VoletiRam, @yairgott, @zackcam, @zykovd