Skip to content

Commit

Permalink
Adjust naming for reverse lookup map
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavdangeti committed Jan 16, 2024
1 parent 28a9df9 commit ec88318
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ var SupportedSimilarityMetrics = map[string]struct{}{
CosineSimilarity: {},
}

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

const (
IndexOptimizedForRecall = "recall"
IndexOptimizedForLatency = "latency"
Expand All @@ -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,
}

0 comments on commit ec88318

Please sign in to comment.