From bce3b0a79eb6023390a390c9e945be65effb29c4 Mon Sep 17 00:00:00 2001 From: Aditi Ahuja Date: Fri, 18 Oct 2024 12:02:32 +0530 Subject: [PATCH] more commentary updates --- faiss_vector_posting.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/faiss_vector_posting.go b/faiss_vector_posting.go index e6558af..466d652 100644 --- a/faiss_vector_posting.go +++ b/faiss_vector_posting.go @@ -416,6 +416,13 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool // Getting the vector IDs corresponding to the eligible // doc IDs. + // The docVecIDMap maps each docID to vectorIDs corresponding + // to it. + // Usually, each docID has one vecID mapped to it unless + // the vector is nested, in which case there can be multiple + // vectorIDs mapped to the same docID. + // Eg. docID d1 -> vecID v1, for the first case + // d1 -> {v1,v2}, for the second case. eligibleVecIDsBitmap := roaring.NewBitmap() vecIDsUint32 := make([]uint32, 0) for _, eligibleDocID := range eligibleDocIDs {