Class MutableVectorIndex
- java.lang.Object
-
- org.apache.pinot.segment.local.realtime.impl.vector.MutableVectorIndex
-
- All Implemented Interfaces:
Closeable,AutoCloseable,IndexReader,MutableIndex,VectorIndexReader
public class MutableVectorIndex extends Object implements VectorIndexReader, MutableIndex
A Vector index reader for the real-time Vector index values on the fly. Since there is no good mutable vector index implementation for topK search, we just do brute force search.This class is thread-safe for single writer multiple readers.
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_COMMIT_DOCSstatic longDEFAULT_COMMIT_INTERVAL_MSstatic StringVECTOR_INDEX_DOC_ID_COLUMN_NAME
-
Constructor Summary
Constructors Constructor Description MutableVectorIndex(String segmentName, String vectorColumn, VectorIndexConfig vectorIndexConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Object[] values, int[] dictIds, int docId)voidadd(Object value, int dictId, int docId)voidclose()org.roaringbitmap.buffer.MutableRoaringBitmapgetDocIds(float[] vector, int topK)
-
-
-
Field Detail
-
VECTOR_INDEX_DOC_ID_COLUMN_NAME
public static final String VECTOR_INDEX_DOC_ID_COLUMN_NAME
- See Also:
- Constant Field Values
-
DEFAULT_COMMIT_INTERVAL_MS
public static final long DEFAULT_COMMIT_INTERVAL_MS
- See Also:
- Constant Field Values
-
DEFAULT_COMMIT_DOCS
public static final long DEFAULT_COMMIT_DOCS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MutableVectorIndex
public MutableVectorIndex(String segmentName, String vectorColumn, VectorIndexConfig vectorIndexConfig)
-
-
Method Detail
-
add
public void add(@Nonnull Object value, int dictId, int docId)- Specified by:
addin interfaceMutableIndex
-
add
public void add(@Nonnull Object[] values, @Nullable int[] dictIds, int docId)- Specified by:
addin interfaceMutableIndex
-
getDocIds
public org.roaringbitmap.buffer.MutableRoaringBitmap getDocIds(float[] vector, int topK)- Specified by:
getDocIdsin interfaceVectorIndexReader
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-