Module org.elasticsearch.server
Class ES920DiskBBQVectorsReader
java.lang.Object
org.apache.lucene.codecs.KnnVectorsReader
org.elasticsearch.index.codec.vectors.diskbbq.IVFVectorsReader
org.elasticsearch.index.codec.vectors.diskbbq.ES920DiskBBQVectorsReader
- All Implemented Interfaces:
Closeable,AutoCloseable
Default implementation of
IVFVectorsReader. It scores the posting lists centroids using
brute force and then scores the top ones using the posting list.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.codec.vectors.diskbbq.IVFVectorsReader
IVFVectorsReader.CentroidIterator, IVFVectorsReader.CentroidOffsetAndLength, IVFVectorsReader.FieldEntry, IVFVectorsReader.PostingVisitor -
Field Summary
Fields inherited from class org.elasticsearch.index.codec.vectors.diskbbq.IVFVectorsReader
fields -
Method Summary
Modifier and TypeMethodDescriptionprotected IVFVectorsReader.FieldEntrydoReadField(org.apache.lucene.store.IndexInput input, String rawVectorFormat, boolean useDirectIOReads, org.apache.lucene.index.VectorSimilarityFunction similarityFunction, org.apache.lucene.index.VectorEncoding vectorEncoding, int numCentroids, long centroidOffset, long centroidLength, long postingListOffset, long postingListLength, float[] globalCentroid, float globalCentroidDp) getCentroidIterator(org.apache.lucene.index.FieldInfo fieldInfo, int numCentroids, org.apache.lucene.store.IndexInput centroids, float[] targetQuery, org.apache.lucene.store.IndexInput postingListSlice, org.apache.lucene.search.AcceptDocs acceptDocs, float approximateCost, org.apache.lucene.index.FloatVectorValues values, float visitRatio) getOffHeapByteSize(org.apache.lucene.index.FieldInfo fieldInfo) getPostingListPrefetchIterator(IVFVectorsReader.CentroidIterator centroidIterator, org.apache.lucene.store.IndexInput postingListSlice) getPostingVisitor(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.store.IndexInput indexInput, float[] target, org.apache.lucene.util.Bits acceptDocs) Methods inherited from class org.elasticsearch.index.codec.vectors.diskbbq.IVFVectorsReader
checkIntegrity, close, getByteVectorValues, getFloatVectorValues, search, searchMethods inherited from class org.apache.lucene.codecs.KnnVectorsReader
finishMerge, getMergeInstance, mergeOffHeapByteSizeMaps
-
Method Details
-
getPostingListPrefetchIterator
public IVFVectorsReader.CentroidIterator getPostingListPrefetchIterator(IVFVectorsReader.CentroidIterator centroidIterator, org.apache.lucene.store.IndexInput postingListSlice) throws IOException - Throws:
IOException
-
getCentroidIterator
public IVFVectorsReader.CentroidIterator getCentroidIterator(org.apache.lucene.index.FieldInfo fieldInfo, int numCentroids, org.apache.lucene.store.IndexInput centroids, float[] targetQuery, org.apache.lucene.store.IndexInput postingListSlice, org.apache.lucene.search.AcceptDocs acceptDocs, float approximateCost, org.apache.lucene.index.FloatVectorValues values, float visitRatio) throws IOException - Specified by:
getCentroidIteratorin classIVFVectorsReader- Throws:
IOException
-
doReadField
protected IVFVectorsReader.FieldEntry doReadField(org.apache.lucene.store.IndexInput input, String rawVectorFormat, boolean useDirectIOReads, org.apache.lucene.index.VectorSimilarityFunction similarityFunction, org.apache.lucene.index.VectorEncoding vectorEncoding, int numCentroids, long centroidOffset, long centroidLength, long postingListOffset, long postingListLength, float[] globalCentroid, float globalCentroidDp) - Specified by:
doReadFieldin classIVFVectorsReader
-
getPostingVisitor
public IVFVectorsReader.PostingVisitor getPostingVisitor(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.store.IndexInput indexInput, float[] target, org.apache.lucene.util.Bits acceptDocs) throws IOException - Specified by:
getPostingVisitorin classIVFVectorsReader- Throws:
IOException
-
getOffHeapByteSize
- Overrides:
getOffHeapByteSizein classIVFVectorsReader
-