Skip to content

Support hybrid_policy for filtered FT.SEARCH and FT.HYBRID queries - #42

Open
slorello89 wants to merge 1 commit into
mainfrom
codex/sql-hybrid-policy-api
Open

slorello89 wants to merge 1 commit into
mainfrom
codex/sql-hybrid-policy-api

Conversation

@slorello89

Copy link
Copy Markdown

Filtered vector queries on Search on Flex can require an explicit execution policy. This adds an optional hybrid_policy argument to the translator, sync/async executors, and executor factories.

  • Accept ADHOC_BF and BATCHES, normalize case, and reject invalid values.
  • Emit HYBRID_POLICY for filtered FT.SEARCH KNN queries.
  • Emit FILTER ... POLICY for filtered FT.HYBRID queries, mapping ADHOC_BF to ADHOC.
  • Preserve existing translation when no policy is supplied or no filter is present.
  • Add API documentation, a usage example, and regression coverage.

Validation: all 629 tests passed; formatting, import sorting, and type checks passed. Both policies were also exercised through synchronous and asynchronous RedisVL SQL execution against Redis 8.4 and through the RAM/Flex compatibility runs.

Companion RedisVL API PR: redis/redis-vl-python#779

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant