Skip to content

feat: add scalar-only search queries - #15

Merged
chinaux merged 1 commit into
mainfrom
feat/scalar-query
Sep 18, 2026
Merged

chinaux merged 1 commit into
mainfrom
feat/scalar-query

Conversation

@egolearner

Copy link
Copy Markdown
Contributor

The safe wrapper cannot currently construct a scalar-only query, although the native C API supports filtering collections without vector or FTS fields. This prevents consumers such as zvec-grep from checking file metadata through the safe API without a local patch.

Add SearchQuery::scalar(topk) so callers can apply existing filters and output projections without supplying a vector, FTS payload, or target field. The query owns its native handle before fallible setup, ensuring cleanup on failure. Existing APIs remain unchanged.

Add regression coverage for exact and prefix matching, missing matches, field projection, result limits, and the empty-file-name existence query used by zvec-grep. Document the API and its unordered, bounded results in both READMEs.

Validation: rustfmt --check and git diff --check passed. Compilation and runtime tests were not run because local repository instructions require an explicit request for those checks.

@egolearner
egolearner requested a review from chinaux September 18, 2026 02:50

@chinaux chinaux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chinaux
chinaux merged commit 16314db into main Sep 18, 2026
8 checks passed
@egolearner
egolearner deleted the feat/scalar-query branch September 18, 2026 06:35
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.

2 participants