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 int
The field for thedimension
record component.private final int[]
The field for theordToDoc
record component.private final VectorSimilarityFunction
The field for thesimilarityFunction
record component.private final long
The field for thevectorDataLength
record component.private final long
The field for thevectorDataOffset
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
FieldEntry
(int dimension, long vectorDataOffset, long vectorDataLength, int[] ordToDoc, VectorSimilarityFunction similarityFunction) Creates an instance of aFieldEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thedimension
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int[]
ordToDoc()
Returns the value of theordToDoc
record component.Returns the value of thesimilarityFunction
record component.(package private) int
size()
final String
toString()
Returns a string representation of this record class.long
Returns the value of thevectorDataLength
record component.long
Returns the value of thevectorDataOffset
record component.
-
Field Details
-
dimension
private final int dimensionThe field for thedimension
record component. -
vectorDataOffset
private final long vectorDataOffsetThe field for thevectorDataOffset
record component. -
vectorDataLength
private final long vectorDataLengthThe field for thevectorDataLength
record component. -
ordToDoc
private final int[] ordToDocThe field for theordToDoc
record component. -
similarityFunction
The field for thesimilarityFunction
record component.
-
-
Constructor Details
-
FieldEntry
private FieldEntry(int dimension, long vectorDataOffset, long vectorDataLength, int[] ordToDoc, VectorSimilarityFunction similarityFunction) Creates an instance of aFieldEntry
record class.- Parameters:
dimension
- the value for thedimension
record componentvectorDataOffset
- the value for thevectorDataOffset
record componentvectorDataLength
- the value for thevectorDataLength
record componentordToDoc
- the value for theordToDoc
record componentsimilarityFunction
- the value for thesimilarityFunction
record 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 thedimension
record component.- Returns:
- the value of the
dimension
record component
-
vectorDataOffset
public long vectorDataOffset()Returns the value of thevectorDataOffset
record component.- Returns:
- the value of the
vectorDataOffset
record component
-
vectorDataLength
public long vectorDataLength()Returns the value of thevectorDataLength
record component.- Returns:
- the value of the
vectorDataLength
record component
-
ordToDoc
public int[] ordToDoc()Returns the value of theordToDoc
record component.- Returns:
- the value of the
ordToDoc
record component
-
similarityFunction
Returns the value of thesimilarityFunction
record component.- Returns:
- the value of the
similarityFunction
record component
-