Module org.elasticsearch.server
Class ES920DiskBBQVectorsReader
java.lang.Object
org.apache.lucene.codecs.KnnVectorsReader
org.elasticsearch.index.codec.vectors.diskbbq.IVFVectorsReader<IVFVectorsReader.FieldEntry>
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.FieldEntry, IVFVectorsReader.PostingVisitor -
Field Summary
Fields inherited from class org.elasticsearch.index.codec.vectors.diskbbq.IVFVectorsReader
fields, ivfCentroids, ivfClusters, versionMeta -
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) getPostingListPrefetchIterator(CentroidIterator centroidIterator, org.apache.lucene.store.IndexInput postingListSlice) getPostingVisitor(org.apache.lucene.index.FieldInfo fieldInfo, int numVectors, org.apache.lucene.store.IndexInput indexInput, float[] target, org.apache.lucene.util.Bits acceptDocs, org.apache.lucene.store.IndexInput centroidSlice) Methods inherited from class org.elasticsearch.index.codec.vectors.diskbbq.IVFVectorsReader
checkIntegrity, close, getByteVectorValues, getFloatVectorValues, getOffHeapByteSize, getReaderForField, openDataInput, search, searchMethods inherited from class org.apache.lucene.codecs.KnnVectorsReader
finishMerge, getMergeInstance, mergeOffHeapByteSizeMaps
-
Method Details
-
getPostingListPrefetchIterator
public CentroidIterator getPostingListPrefetchIterator(CentroidIterator centroidIterator, org.apache.lucene.store.IndexInput postingListSlice) throws IOException - Throws:
IOException
-
getCentroidIterator
public 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<IVFVectorsReader.FieldEntry>- 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<IVFVectorsReader.FieldEntry>
-
getPostingVisitor
public IVFVectorsReader.PostingVisitor getPostingVisitor(org.apache.lucene.index.FieldInfo fieldInfo, int numVectors, org.apache.lucene.store.IndexInput indexInput, float[] target, org.apache.lucene.util.Bits acceptDocs, org.apache.lucene.store.IndexInput centroidSlice) throws IOException - Specified by:
getPostingVisitorin classIVFVectorsReader<IVFVectorsReader.FieldEntry>- Throws:
IOException
-