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-60029 - Add index types for tuning for recall/latency. #46

Merged
merged 6 commits into from
Jan 16, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Adjust naming for reverse lookup map
abhinavdangeti committed Jan 16, 2024

Verified

This commit was signed with the committer’s verified signature.
veteran29 Filip Maciejewski
commit ec883180b4f184ca80ffcc1cb98e1b31e3b65962
10 changes: 6 additions & 4 deletions vector.go
Original file line number Diff line number Diff line change
@@ -48,6 +48,8 @@ var SupportedSimilarityMetrics = map[string]struct{}{
CosineSimilarity: {},
}

// -----------------------------------------------------------------------------

const (
IndexOptimizedForRecall = "recall"
IndexOptimizedForLatency = "latency"
@@ -60,8 +62,8 @@ var SupportedVectorIndexOptimizations = map[string]int{
IndexOptimizedForLatency: 1,
}

// maps the index optimization type int to the string
var IndexOptimizationMap = map[int]string{
SupportedVectorIndexOptimizations[IndexOptimizedForRecall]: IndexOptimizedForRecall,
SupportedVectorIndexOptimizations[IndexOptimizedForLatency]: IndexOptimizedForLatency,
// Reverse maps vector index optimizations': int -> string
var VectorIndexOptimizationsReverseLookup = map[int]string{
0: IndexOptimizedForRecall,
1: IndexOptimizedForLatency,
}