Skip to content

Sparse index query support#363

Draft
jhamon wants to merge 4 commits intomainfrom
cursor/PIN-43-sparse-index-query-support-2bd4
Draft

Sparse index query support#363
jhamon wants to merge 4 commits intomainfrom
cursor/PIN-43-sparse-index-query-support-2bd4

Conversation

@jhamon
Copy link
Collaborator

@jhamon jhamon commented Jan 13, 2026

Add support for sparse-only queries to enable cascading retrieval patterns and align the SDK's QueryOptions type with the backend API.


Linear Issue: PIN-43

Open in Cursor Open in Web

Fixes GitHub issue #337 by allowing queries with only sparseVector parameter,
enabling cascading retrieval patterns with separate dense and sparse indexes.

Changes:
- Add new QueryBySparseVector type for sparse-only queries
- Update QueryOptions union to include QueryBySparseVector
- Update validator to require at least one of: id, vector, or sparseVector
- Allow empty vector when sparseVector is provided
- Export QueryBySparseVector type from main index files
- Add comprehensive tests for sparse-only query scenarios

All tests pass and TypeScript compilation succeeds.
@cursor
Copy link

cursor bot commented Jan 13, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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