Record Class MatchRegionRetriever.DocHighlightData

java.lang.Object
java.lang.Record
org.apache.lucene.search.matchhighlight.MatchRegionRetriever.DocHighlightData
Enclosing class:
MatchRegionRetriever

private static record MatchRegionRetriever.DocHighlightData(int docId, LeafReader leafReader, int leafDocId, MatchRegionRetriever.FieldValueProvider fieldValueProvider, Map<String,List<OffsetRange>> hits) extends Record
  • Field Details

    • docId

      private final int docId
      The field for the docId record component.
    • leafReader

      private final LeafReader leafReader
      The field for the leafReader record component.
    • leafDocId

      private final int leafDocId
      The field for the leafDocId record component.
    • fieldValueProvider

      private final MatchRegionRetriever.FieldValueProvider fieldValueProvider
      The field for the fieldValueProvider record component.
    • hits

      private final Map<String,List<OffsetRange>> hits
      The field for the hits record component.
  • Constructor Details

    • DocHighlightData

      private DocHighlightData(int docId, LeafReader leafReader, int leafDocId, MatchRegionRetriever.FieldValueProvider fieldValueProvider, Map<String,List<OffsetRange>> hits)
      Creates an instance of a DocHighlightData record class.
      Parameters:
      docId - the value for the docId record component
      leafReader - the value for the leafReader record component
      leafDocId - the value for the leafDocId record component
      fieldValueProvider - the value for the fieldValueProvider record component
      hits - the value for the hits 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • docId

      public int docId()
      Returns the value of the docId record component.
      Returns:
      the value of the docId record component
    • leafReader

      public LeafReader leafReader()
      Returns the value of the leafReader record component.
      Returns:
      the value of the leafReader record component
    • leafDocId

      public int leafDocId()
      Returns the value of the leafDocId record component.
      Returns:
      the value of the leafDocId record component
    • fieldValueProvider

      public MatchRegionRetriever.FieldValueProvider fieldValueProvider()
      Returns the value of the fieldValueProvider record component.
      Returns:
      the value of the fieldValueProvider record component
    • hits

      public Map<String,List<OffsetRange>> hits()
      Returns the value of the hits record component.
      Returns:
      the value of the hits record component