Module org.apache.lucene.codecs
Record Class SimpleTextKnnVectorsReader.FieldEntry
java.lang.Object
java.lang.Record
org.apache.lucene.codecs.simpletext.SimpleTextKnnVectorsReader.FieldEntry
- Enclosing class:
SimpleTextKnnVectorsReader
private static record SimpleTextKnnVectorsReader.FieldEntry(int dimension, long vectorDataOffset, long vectorDataLength, int[] ordToDoc, VectorSimilarityFunction similarityFunction)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thedimensionrecord component.private final int[]The field for theordToDocrecord component.private final VectorSimilarityFunctionThe field for thesimilarityFunctionrecord component.private final longThe field for thevectorDataLengthrecord component.private final longThe field for thevectorDataOffsetrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFieldEntry(int dimension, long vectorDataOffset, long vectorDataLength, int[] ordToDoc, VectorSimilarityFunction similarityFunction) Creates an instance of aFieldEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.int[]ordToDoc()Returns the value of theordToDocrecord component.Returns the value of thesimilarityFunctionrecord component.(package private) intsize()final StringtoString()Returns a string representation of this record class.longReturns the value of thevectorDataLengthrecord component.longReturns the value of thevectorDataOffsetrecord component.
-
Field Details
-
dimension
private final int dimensionThe field for thedimensionrecord component. -
vectorDataOffset
private final long vectorDataOffsetThe field for thevectorDataOffsetrecord component. -
vectorDataLength
private final long vectorDataLengthThe field for thevectorDataLengthrecord component. -
ordToDoc
private final int[] ordToDocThe field for theordToDocrecord component. -
similarityFunction
The field for thesimilarityFunctionrecord component.
-
-
Constructor Details
-
FieldEntry
private FieldEntry(int dimension, long vectorDataOffset, long vectorDataLength, int[] ordToDoc, VectorSimilarityFunction similarityFunction) Creates an instance of aFieldEntryrecord class.- Parameters:
dimension- the value for thedimensionrecord componentvectorDataOffset- the value for thevectorDataOffsetrecord componentvectorDataLength- the value for thevectorDataLengthrecord componentordToDoc- the value for theordToDocrecord componentsimilarityFunction- the value for thesimilarityFunctionrecord component
-
-
Method Details
-
size
int size() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
dimension
public int dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
vectorDataOffset
public long vectorDataOffset()Returns the value of thevectorDataOffsetrecord component.- Returns:
- the value of the
vectorDataOffsetrecord component
-
vectorDataLength
public long vectorDataLength()Returns the value of thevectorDataLengthrecord component.- Returns:
- the value of the
vectorDataLengthrecord component
-
ordToDoc
public int[] ordToDoc()Returns the value of theordToDocrecord component.- Returns:
- the value of the
ordToDocrecord component
-
similarityFunction
Returns the value of thesimilarityFunctionrecord component.- Returns:
- the value of the
similarityFunctionrecord component
-