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 Details

  • Constructor Details

    • PostingMetadata

      public PostingMetadata(long offset, long length, int queryCentroidOrdinal, float documentCentroidScore)
      Creates an instance of a PostingMetadata record class.
      Parameters:
      offset - the value for the offset record component
      length - the value for the length record component
      queryCentroidOrdinal - the value for the queryCentroidOrdinal record component
      documentCentroidScore - the value for the documentCentroidScore record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • offset

      public long offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • length

      public long length()
      Returns the value of the length record component.
      Returns:
      the value of the length record component
    • queryCentroidOrdinal

      public int queryCentroidOrdinal()
      Returns the value of the queryCentroidOrdinal record component.
      Returns:
      the value of the queryCentroidOrdinal record component
    • documentCentroidScore

      public float documentCentroidScore()
      Returns the value of the documentCentroidScore record component.
      Returns:
      the value of the documentCentroidScore record component