Skip to content

Conversation

@CascadingRadium
Copy link
Member

  • Modify the VectorIndex interface to use a new SearchWithFilter API that accepts an EligibleDocumentList instead of a slice of docIDs, enabling a visitor-style iteration in the storage layer and abstracting away eligible-document representation and implementation details.
  • Remove redundant requiresFiltering flag in InterpretVectorIndex interface.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR re-architects the vector search API by introducing a new abstraction layer for eligible document filtering. The changes modify interface definitions to enable visitor-style iteration in the storage layer and remove redundant parameters.

  • Introduces EligibleDocumentList abstraction to replace direct slice usage in SearchWithFilter, enabling more flexible document filtering implementations
  • Removes the redundant requiresFiltering boolean parameter from InterpretVectorIndex, simplifying the interface
  • Adds comprehensive documentation comments for the VectorIndex interface methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +66 to +69
// SearchWithFilter performs a kNN search for the given query vector, filtering results based on eligible document IDs.
// - qVector: the query vector
// - k: the number of similar vectors to return
// - eligibleList: list of eligible document IDs to consider
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

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

The documentation comment states "filtering results based on eligible document IDs" which might be slightly misleading since the new API abstracts away the specific representation of eligible documents. Consider updating to: "filtering results based on eligible documents" to better reflect the abstraction introduced by EligibleDocumentList.

Suggested change
// SearchWithFilter performs a kNN search for the given query vector, filtering results based on eligible document IDs.
// - qVector: the query vector
// - k: the number of similar vectors to return
// - eligibleList: list of eligible document IDs to consider
// SearchWithFilter performs a kNN search for the given query vector, filtering results based on eligible documents.
// - qVector: the query vector
// - k: the number of similar vectors to return
// - eligibleList: list of eligible documents to consider

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants