Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MB-62230 - Pre-Filtering support for kNN #45

Merged
merged 7 commits into from
Sep 9, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion segment_vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,17 @@ type VecPostingsIterator interface {
type VectorIndex interface {
// @params: Search params for backing vector index (like IVF, HNSW, etc.)
Search(qVector []float32, k int64, params json.RawMessage) (VecPostingsList, error)
// @eligibleDocIDs: DocIDs in the segment eligible for the kNN query.
SearchWithFilter(qVector []float32, k int64, eligibleDocIDs []uint64,
params json.RawMessage) (VecPostingsList, error)
Close()
Size() uint64
}

type VectorSegment interface {
Segment
InterpretVectorIndex(field string, except *roaring.Bitmap) (VectorIndex, error)
InterpretVectorIndex(field string, requiresFiltering bool, except *roaring.Bitmap) (
VectorIndex, error)
}

type VecPosting interface {
Expand Down
Loading