feat(search): add RERANK parameter for HNSW vector fields#3356
Open
nkaradzhov wants to merge 1 commit into
Open
feat(search): add RERANK parameter for HNSW vector fields#3356nkaradzhov wants to merge 1 commit into
nkaradzhov wants to merge 1 commit into
Conversation
Add the optional RERANK boolean to HNSW vector field definitions in FT.CREATE, introduced in Redis 8.10 for disk-based vector indexes. When set, the client emits `RERANK TRUE` / `RERANK FALSE`; it is only sent when explicitly provided. The parameter is HNSW-only and confined to the HNSW schema type. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for the
RERANKparameter on HNSW vector field definitions inFT.CREATE, introduced in Redis 8.10 (RediSearch, for disk-based vector indexes).RERANK?: booleanon the HNSW schema vector field type.RERANK TRUEorRERANK FALSEas a key-value pair in the field definition.The parameter is HNSW-only;
FLATandSVS-VAMANAare unaffected and the type narrowing makesRERANKa compile error on those algorithms. The value is passed through as-is, so MVP (TRUE-only) vs later (FALSEallowed) validation stays server-side.Note: creating a disk-based vector index is a server capability and is not exposed as an
FT.CREATEclient flag, so the 8.10-gated live test asserts the parameter reaches the server and is recognized (rejected only for the index type, not as a syntax error).🤖 Generated with Claude Code
Note
Low Risk
Opt-in schema serialization in the search client only; no changes to connection, auth, or existing index defaults.
Overview
Adds optional
RERANKon HNSW vector fields inFT.CREATE(Redis 8.10 / disk-based indexes). When set, the client emitsRERANK TRUEorRERANK FALSE; if omitted, nothing is sent.Types limit
RERANKto HNSW so FLAT and SVS-VAMANA schemas are unchanged. Tests cover argument transformation and a version-gated integration check that the server accepts the token (OSS tests expect a disk-based index rejection, not a syntax error).Reviewed by Cursor Bugbot for commit 42e2741. Bugbot is set up for automated code reviews on this repo. Configure here.