mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 18:40:38 +00:00
Since Vector Store service filtering API has been implemented (scylladb/vector-store#334), there is a need for the implementation of Scylla side part. This patch should implement a `statement_restrictions` parsing into Vector Store filtering API compatible JSON objects. Those objects should be added to ANN query vector POST requests as `filter` object. After this patch, the subset of all operations ([Vector Search Filtering Milestone 1](https://scylladb.atlassian.net/wiki/spaces/RND/pages/156729450/Vector+Search+Filtering+Design+Document#Milestone-1)) happy path should be completed, allowing users to filter on primary key columns with single column `=` and `IN` or multiple column `()=()` and `() IN ()`. The restrictions for other operations should be implemented in a PR on Vector Store service side. --- This PR implements parsing the `statement_restrictions` into Vector Store filtering API compatible JSON objects. The JSON objects are created and used in ANN vector queries with filtering. It closes the Scylla side implementation of Vector Search filtering milestone 1. Unit tests for `statement_restrictions` parsing are added. Integration tests will be added on Vector Store service side PR. --- Fixes: SCYLLADB-249 New feature, should land into 2026.1 Closes scylladb/scylladb#28109 * github.com:scylladb/scylladb: docs: update documentation on filtering with vector queries test/vector_search: add test for filtered ANN with VS mock test/vector_search: add restriction to JSON conversion unit tests vector_search: cql: construct and use filter in ANN vector queries select_statement: do not require post query ordering for vector queries vector_search: add `statement_restrictions` to JSON parsing