Skip to content

Commit

Permalink
MB-60943 - Add option for memory-optimised vector indexes. (#49)
Browse files Browse the repository at this point in the history
added option to optimise for memory
  • Loading branch information
metonymic-smokey authored May 21, 2024
1 parent 42a777e commit f4827a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,20 @@ var SupportedSimilarityMetrics = map[string]struct{}{
const (
IndexOptimizedForRecall = "recall"
IndexOptimizedForLatency = "latency"
IndexOptimizedForMemory = "memory"
)

const DefaultIndexOptimization = IndexOptimizedForRecall

var SupportedVectorIndexOptimizations = map[string]int{
IndexOptimizedForRecall: 0,
IndexOptimizedForLatency: 1,
IndexOptimizedForMemory: 2,
}

// Reverse maps vector index optimizations': int -> string
var VectorIndexOptimizationsReverseLookup = map[int]string{
0: IndexOptimizedForRecall,
1: IndexOptimizedForLatency,
2: IndexOptimizedForMemory,
}

0 comments on commit f4827a8

Please sign in to comment.