From aa9e354788d999e4d9a1190145eec1d916aa8469 Mon Sep 17 00:00:00 2001 From: Aditi Ahuja Date: Fri, 17 May 2024 11:33:29 +0530 Subject: [PATCH] added option to optimise for memory --- vector.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector.go b/vector.go index 12c5433..abbd840 100644 --- a/vector.go +++ b/vector.go @@ -53,6 +53,7 @@ var SupportedSimilarityMetrics = map[string]struct{}{ const ( IndexOptimizedForRecall = "recall" IndexOptimizedForLatency = "latency" + IndexOptimizedForMemory = "memory" ) const DefaultIndexOptimization = IndexOptimizedForRecall @@ -60,10 +61,12 @@ 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, }