Module org.elasticsearch.server
Record Class PostingMetadata
java.lang.Object
java.lang.Record
org.elasticsearch.index.codec.vectors.diskbbq.PostingMetadata
- Record Components:
offset- The offset of the posting list in the index.length- The length of the posting list in bytes.queryCentroidOrdinal- The ordinal of the centroid that relates to the query quantization, may be the same as the centroid used for the document, may be different.documentCentroidScore- The score of the document postings centroid and the query vector
public record PostingMetadata(long offset, long length, int queryCentroidOrdinal, float documentCentroidScore)
extends Record
Metadata about a posting list for a centroid.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPostingMetadata(long offset, long length, int queryCentroidOrdinal, float documentCentroidScore) Creates an instance of aPostingMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thedocumentCentroidScorerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longlength()Returns the value of thelengthrecord component.longoffset()Returns the value of theoffsetrecord component.intReturns the value of thequeryCentroidOrdinalrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NO_ORDINAL
public static final int NO_ORDINAL- See Also:
-
-
Constructor Details
-
PostingMetadata
public PostingMetadata(long offset, long length, int queryCentroidOrdinal, float documentCentroidScore) Creates an instance of aPostingMetadatarecord class.- Parameters:
offset- the value for theoffsetrecord componentlength- the value for thelengthrecord componentqueryCentroidOrdinal- the value for thequeryCentroidOrdinalrecord componentdocumentCentroidScore- the value for thedocumentCentroidScorerecord component
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
offset
public long offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
length
public long length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-
queryCentroidOrdinal
public int queryCentroidOrdinal()Returns the value of thequeryCentroidOrdinalrecord component.- Returns:
- the value of the
queryCentroidOrdinalrecord component
-
documentCentroidScore
public float documentCentroidScore()Returns the value of thedocumentCentroidScorerecord component.- Returns:
- the value of the
documentCentroidScorerecord component
-