Class OffHeapByteVectorValues
java.lang.Object
org.apache.lucene.search.DocIdSetIterator
org.apache.lucene.index.ByteVectorValues
org.apache.lucene.codecs.lucene95.OffHeapByteVectorValues
- All Implemented Interfaces:
RandomAccessVectorValues<byte[]>
- Direct Known Subclasses:
OffHeapByteVectorValues.DenseOffHeapVectorValues
public abstract class OffHeapByteVectorValues
extends ByteVectorValues
implements RandomAccessVectorValues<byte[]>
Read the vector values from the index input. This supports both iterated and random access.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Dense vector values that are stored off-heap. -
Field Summary
Modifier and TypeFieldDescriptionprotected final byte[]
protected final ByteBuffer
protected final int
protected final int
protected int
protected final int
protected final IndexInput
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
Method Summary
Modifier and TypeMethodDescriptionint
Return the dimension of the vectorsstatic OffHeapByteVectorValues
load
(OrdToDocDISIReaderConfiguration configuration, VectorEncoding vectorEncoding, int dimension, long vectorDataOffset, long vectorDataLength, IndexInput vectorData) int
size()
Return the number of vectors for this field.byte[]
vectorValue
(int targetOrd) Return the vector value indexed at the given ordinal.Methods inherited from class org.apache.lucene.index.ByteVectorValues
cost, vectorValue
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
advance, all, docID, empty, nextDoc, range, slowAdvance
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.hnsw.RandomAccessVectorValues
copy, getAcceptOrds, ordToDoc
-
Field Details
-
dimension
protected final int dimension -
size
protected final int size -
slice
-
lastOrd
protected int lastOrd -
binaryValue
protected final byte[] binaryValue -
byteBuffer
-
byteSize
protected final int byteSize
-
-
Method Details
-
dimension
public int dimension()Description copied from class:ByteVectorValues
Return the dimension of the vectors- Specified by:
dimension
in interfaceRandomAccessVectorValues<byte[]>
- Specified by:
dimension
in classByteVectorValues
-
size
public int size()Description copied from class:ByteVectorValues
Return the number of vectors for this field.- Specified by:
size
in interfaceRandomAccessVectorValues<byte[]>
- Specified by:
size
in classByteVectorValues
- Returns:
- the number of vectors returned by this iterator
-
vectorValue
Description copied from interface:RandomAccessVectorValues
Return the vector value indexed at the given ordinal.- Specified by:
vectorValue
in interfaceRandomAccessVectorValues<byte[]>
- Parameters:
targetOrd
- a valid ordinal, ≥ 0 and <RandomAccessVectorValues.size()
.- Throws:
IOException
-
load
public static OffHeapByteVectorValues load(OrdToDocDISIReaderConfiguration configuration, VectorEncoding vectorEncoding, int dimension, long vectorDataOffset, long vectorDataLength, IndexInput vectorData) throws IOException - Throws:
IOException
-