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 Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thedocIdrecord component.private final MatchRegionRetriever.FieldValueProviderThe field for thefieldValueProviderrecord component.private final Map<String, List<OffsetRange>> The field for thehitsrecord component.private final intThe field for theleafDocIdrecord component.private final LeafReaderThe field for theleafReaderrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDocHighlightData(int docId, LeafReader leafReader, int leafDocId, MatchRegionRetriever.FieldValueProvider fieldValueProvider, Map<String, List<OffsetRange>> hits) Creates an instance of aDocHighlightDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdocId()Returns the value of thedocIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldValueProviderrecord component.final inthashCode()Returns a hash code value for this object.hits()Returns the value of thehitsrecord component.intReturns the value of theleafDocIdrecord component.Returns the value of theleafReaderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
docId
private final int docIdThe field for thedocIdrecord component. -
leafReader
The field for theleafReaderrecord component. -
leafDocId
private final int leafDocIdThe field for theleafDocIdrecord component. -
fieldValueProvider
The field for thefieldValueProviderrecord component. -
hits
The field for thehitsrecord component.
-
-
Constructor Details
-
DocHighlightData
private DocHighlightData(int docId, LeafReader leafReader, int leafDocId, MatchRegionRetriever.FieldValueProvider fieldValueProvider, Map<String, List<OffsetRange>> hits) Creates an instance of aDocHighlightDatarecord class.- Parameters:
docId- the value for thedocIdrecord componentleafReader- the value for theleafReaderrecord componentleafDocId- the value for theleafDocIdrecord componentfieldValueProvider- the value for thefieldValueProviderrecord componenthits- the value for thehitsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
docId
public int docId()Returns the value of thedocIdrecord component.- Returns:
- the value of the
docIdrecord component
-
leafReader
Returns the value of theleafReaderrecord component.- Returns:
- the value of the
leafReaderrecord component
-
leafDocId
public int leafDocId()Returns the value of theleafDocIdrecord component.- Returns:
- the value of the
leafDocIdrecord component
-
fieldValueProvider
Returns the value of thefieldValueProviderrecord component.- Returns:
- the value of the
fieldValueProviderrecord component
-
hits
Returns the value of thehitsrecord component.- Returns:
- the value of the
hitsrecord component
-