Class UnifiedHighlighter
java.lang.Object
org.elasticsearch.search.fetch.subphase.highlight.UnifiedHighlighter
- All Implemented Interfaces:
Highlighter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canHighlight(MappedFieldType fieldType)
protected static String
convertFieldValue(MappedFieldType type, Object value)
protected BreakIterator
protected org.apache.lucene.search.uhighlight.UnifiedHighlighter.OffsetSource
getOffsetSource(MappedFieldType fieldType)
protected org.apache.lucene.search.uhighlight.PassageFormatter
getPassageFormatter(FetchSubPhase.HitContext hitContext, SearchHighlightContext.Field field, org.apache.lucene.search.highlight.Encoder encoder)
highlight(FieldHighlightContext fieldContext)
loadFieldValues(CustomUnifiedHighlighter highlighter, SearchExecutionContext searchContext, MappedFieldType fieldType, FetchSubPhase.HitContext hitContext, boolean forceSource)
protected static String
mergeFieldValues(List<Object> fieldValues, char valuesSeparator)
protected org.apache.lucene.analysis.Analyzer
wrapAnalyzer(org.apache.lucene.analysis.Analyzer analyzer, Integer maxAnalyzedOffset)
-
Constructor Details
-
UnifiedHighlighter
public UnifiedHighlighter()
-
-
Method Details
-
canHighlight
- Specified by:
canHighlight
in interfaceHighlighter
-
highlight
- Specified by:
highlight
in interfaceHighlighter
- Throws:
IOException
-
getPassageFormatter
protected org.apache.lucene.search.uhighlight.PassageFormatter getPassageFormatter(FetchSubPhase.HitContext hitContext, SearchHighlightContext.Field field, org.apache.lucene.search.highlight.Encoder encoder) -
wrapAnalyzer
protected org.apache.lucene.analysis.Analyzer wrapAnalyzer(org.apache.lucene.analysis.Analyzer analyzer, Integer maxAnalyzedOffset) -
loadFieldValues
protected List<Object> loadFieldValues(CustomUnifiedHighlighter highlighter, SearchExecutionContext searchContext, MappedFieldType fieldType, FetchSubPhase.HitContext hitContext, boolean forceSource) throws IOException- Throws:
IOException
-
getBreakIterator
-
convertFieldValue
-
mergeFieldValues
-
getOffsetSource
protected org.apache.lucene.search.uhighlight.UnifiedHighlighter.OffsetSource getOffsetSource(MappedFieldType fieldType)
-