Record Class UHComponents
java.lang.Object
java.lang.Record
org.apache.lucene.search.uhighlight.UHComponents
- Record Components:
terms- Query: all terms we extracted (some may be position sensitive)phraseHelper- Query: position-sensitive informationautomata- Query: wildcards (i.e. multi-term query), not position sensitivehasUnrecognizedQueryPart- Query: if part of the query (other than the extracted terms / automata) is a leaf we don't know
public record UHComponents(String field, Predicate<String> fieldMatcher, Query query, BytesRef[] terms, PhraseHelper phraseHelper, LabelledCharArrayMatcher[] automata, boolean hasUnrecognizedQueryPart, Set<UnifiedHighlighter.HighlightFlag> highlightFlags)
extends Record
A parameter object to hold the components a
FieldOffsetStrategy needs.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Constructor Summary
ConstructorsConstructorDescriptionUHComponents(String field, Predicate<String> fieldMatcher, Query query, BytesRef[] terms, PhraseHelper phraseHelper, LabelledCharArrayMatcher[] automata, boolean hasUnrecognizedQueryPart, Set<UnifiedHighlighter.HighlightFlag> highlightFlags) Creates an instance of aUHComponentsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionautomata()Returns the value of theautomatarecord component.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.Returns the value of thefieldMatcherrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasUnrecognizedQueryPartrecord component.Returns the value of thehighlightFlagsrecord component.Returns the value of thephraseHelperrecord component.query()Returns the value of thequeryrecord component.BytesRef[]terms()Returns the value of thetermsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UHComponents
public UHComponents(String field, Predicate<String> fieldMatcher, Query query, BytesRef[] terms, PhraseHelper phraseHelper, LabelledCharArrayMatcher[] automata, boolean hasUnrecognizedQueryPart, Set<UnifiedHighlighter.HighlightFlag> highlightFlags) Creates an instance of aUHComponentsrecord class.- Parameters:
field- the value for thefieldrecord componentfieldMatcher- the value for thefieldMatcherrecord componentquery- the value for thequeryrecord componentterms- the value for thetermsrecord componentphraseHelper- the value for thephraseHelperrecord componentautomata- the value for theautomatarecord componenthasUnrecognizedQueryPart- the value for thehasUnrecognizedQueryPartrecord componenthighlightFlags- the value for thehighlightFlagsrecord 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 '=='. -
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
fieldMatcher
Returns the value of thefieldMatcherrecord component.- Returns:
- the value of the
fieldMatcherrecord component
-
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
terms
Returns the value of thetermsrecord component.- Returns:
- the value of the
termsrecord component
-
phraseHelper
Returns the value of thephraseHelperrecord component.- Returns:
- the value of the
phraseHelperrecord component
-
automata
Returns the value of theautomatarecord component.- Returns:
- the value of the
automatarecord component
-
hasUnrecognizedQueryPart
public boolean hasUnrecognizedQueryPart()Returns the value of thehasUnrecognizedQueryPartrecord component.- Returns:
- the value of the
hasUnrecognizedQueryPartrecord component
-
highlightFlags
Returns the value of thehighlightFlagsrecord component.- Returns:
- the value of the
highlightFlagsrecord component
-