From f4827a85d9c87fb6f00e1c252178de634c6092fb Mon Sep 17 00:00:00 2001 From: Aditi Ahuja <48997495+metonymic-smokey@users.noreply.github.com> Date: Tue, 21 May 2024 22:13:40 +0530 Subject: [PATCH] MB-60943 - Add option for memory-optimised vector indexes. (#49) 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, }