From d4939f4c60efad24fa87f2ab2684df175e1694e4 Mon Sep 17 00:00:00 2001 From: Abhinav Dangeti Date: Fri, 8 Aug 2025 16:58:18 -0600 Subject: [PATCH 1/3] MB-66396: Augment VectorIndex interface Requires: https://github.com/blevesearch/bleve_index_api/pull/71 --- segment_vector.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/segment_vector.go b/segment_vector.go index a57e0b4..837ac8a 100644 --- a/segment_vector.go +++ b/segment_vector.go @@ -20,6 +20,7 @@ package segment import ( "encoding/json" + index "github.com/blevesearch/bleve_index_api" "github.com/RoaringBitmap/roaring/v2" ) @@ -64,6 +65,8 @@ type VectorIndex interface { params json.RawMessage) (VecPostingsList, error) Close() Size() uint64 + + ObtainTopKCentroidCardinalitiesFromIVFIndex(limit int) ([]index.CentroidCardinality, error) } type VectorSegment interface { From af6d4592925b9268c9d634b32744d6c53d969c06 Mon Sep 17 00:00:00 2001 From: Abhinav Dangeti Date: Fri, 22 Aug 2025 11:55:22 -0600 Subject: [PATCH 2/3] Update API signature, bleve_index_api --- go.mod | 2 +- go.sum | 4 ++-- segment_vector.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 2469925..f4b676c 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/RoaringBitmap/roaring/v2 v2.4.5 - github.com/blevesearch/bleve_index_api v1.2.10 + github.com/blevesearch/bleve_index_api v1.2.11-0.20251103165237-ce6f0ce75a22 ) require ( diff --git a/go.sum b/go.sum index f27012b..aa559d5 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/RoaringBitmap/roaring/v2 v2.4.5 h1:uGrrMreGjvAtTBobc0g5IrW1D5ldxDQYe2 github.com/RoaringBitmap/roaring/v2 v2.4.5/go.mod h1:FiJcsfkGje/nZBZgCu0ZxCPOKD/hVXDS2dXi7/eUFE0= github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/blevesearch/bleve_index_api v1.2.10 h1:FMFmZCmTX6PdoLLvwUnKF2RsmILFFwO3h0WPevXY9fE= -github.com/blevesearch/bleve_index_api v1.2.10/go.mod h1:rKQDl4u51uwafZxFrPD1R7xFOwKnzZW7s/LSeK4lgo0= +github.com/blevesearch/bleve_index_api v1.2.11-0.20251103165237-ce6f0ce75a22 h1:j0VFNOG7LUQp8Sx4gW93j15Wy290uA01D2Uet7jRh4Q= +github.com/blevesearch/bleve_index_api v1.2.11-0.20251103165237-ce6f0ce75a22/go.mod h1:rKQDl4u51uwafZxFrPD1R7xFOwKnzZW7s/LSeK4lgo0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/segment_vector.go b/segment_vector.go index 837ac8a..7e50ce4 100644 --- a/segment_vector.go +++ b/segment_vector.go @@ -66,7 +66,7 @@ type VectorIndex interface { Close() Size() uint64 - ObtainTopKCentroidCardinalitiesFromIVFIndex(limit int) ([]index.CentroidCardinality, error) + ObtainKCentroidCardinalitiesFromIVFIndex(limit int, descending bool) ([]index.CentroidCardinality, error) } type VectorSegment interface { From a75a87e3bad644a8f1cfd0522036515903f89cd2 Mon Sep 17 00:00:00 2001 From: Abhinav Dangeti Date: Fri, 7 Nov 2025 12:31:54 -0700 Subject: [PATCH 3/3] Use bleve_index_api@v1.2.11 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f4b676c..236e09f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/RoaringBitmap/roaring/v2 v2.4.5 - github.com/blevesearch/bleve_index_api v1.2.11-0.20251103165237-ce6f0ce75a22 + github.com/blevesearch/bleve_index_api v1.2.11 ) require ( diff --git a/go.sum b/go.sum index aa559d5..d252f9d 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/RoaringBitmap/roaring/v2 v2.4.5 h1:uGrrMreGjvAtTBobc0g5IrW1D5ldxDQYe2 github.com/RoaringBitmap/roaring/v2 v2.4.5/go.mod h1:FiJcsfkGje/nZBZgCu0ZxCPOKD/hVXDS2dXi7/eUFE0= github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/blevesearch/bleve_index_api v1.2.11-0.20251103165237-ce6f0ce75a22 h1:j0VFNOG7LUQp8Sx4gW93j15Wy290uA01D2Uet7jRh4Q= -github.com/blevesearch/bleve_index_api v1.2.11-0.20251103165237-ce6f0ce75a22/go.mod h1:rKQDl4u51uwafZxFrPD1R7xFOwKnzZW7s/LSeK4lgo0= +github.com/blevesearch/bleve_index_api v1.2.11 h1:bXQ54kVuwP8hdrXUSOnvTQfgK0KI1+f9A0ITJT8tX1s= +github.com/blevesearch/bleve_index_api v1.2.11/go.mod h1:rKQDl4u51uwafZxFrPD1R7xFOwKnzZW7s/LSeK4lgo0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=