Class Lucene95HnswVectorsReader
java.lang.Object
org.apache.lucene.codecs.KnnVectorsReader
org.apache.lucene.backward_codecs.lucene95.Lucene95HnswVectorsReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,HnswGraphProvider
,Accountable
Reads vectors from the index segments along with index data structures supporting KNN search.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
close()
getByteVectorValues
(String field) getFloatVectorValues
(String field) Get knn graph values; used for testinglong
void
search
(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) void
search
(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) Methods inherited from class org.apache.lucene.codecs.KnnVectorsReader
getMergeInstance
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Method Details
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsed
in interfaceAccountable
-
checkIntegrity
- Specified by:
checkIntegrity
in classKnnVectorsReader
- Throws:
IOException
-
getFloatVectorValues
- Specified by:
getFloatVectorValues
in classKnnVectorsReader
- Throws:
IOException
-
getByteVectorValues
- Specified by:
getByteVectorValues
in classKnnVectorsReader
- Throws:
IOException
-
search
public void search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) throws IOException - Specified by:
search
in classKnnVectorsReader
- Throws:
IOException
-
search
public void search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) throws IOException - Specified by:
search
in classKnnVectorsReader
- Throws:
IOException
-
getGraph
Get knn graph values; used for testing- Specified by:
getGraph
in interfaceHnswGraphProvider
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-