mirror of https://github.com/apache/lucene.git
LUCENE-10523: factor out UnifiedHighlighter.newFieldHighlighter() method (#821)
This commit is contained in:
parent
7c35311f29
commit
56462b5f96
|
@ -1087,6 +1087,24 @@ public class UnifiedHighlighter {
|
|||
getFormatter(field));
|
||||
}
|
||||
|
||||
protected FieldHighlighter newFieldHighlighter(
|
||||
String field,
|
||||
FieldOffsetStrategy fieldOffsetStrategy,
|
||||
BreakIterator breakIterator,
|
||||
PassageScorer passageScorer,
|
||||
int maxPassages,
|
||||
int maxNoHighlightPassages,
|
||||
PassageFormatter passageFormatter) {
|
||||
return new FieldHighlighter(
|
||||
field,
|
||||
fieldOffsetStrategy,
|
||||
breakIterator,
|
||||
passageScorer,
|
||||
maxPassages,
|
||||
maxNoHighlightPassages,
|
||||
passageFormatter);
|
||||
}
|
||||
|
||||
protected UHComponents getHighlightComponents(String field, Query query, Set<Term> allTerms) {
|
||||
Predicate<String> fieldMatcher = getFieldMatcher(field);
|
||||
Set<HighlightFlag> highlightFlags = getFlags(field);
|
||||
|
|
Loading…
Reference in New Issue