Class UnifiedHighlighter
- java.lang.Object
-
- org.elasticsearch.search.fetch.subphase.highlight.UnifiedHighlighter
-
- All Implemented Interfaces:
Highlighter
public class UnifiedHighlighter extends Object implements Highlighter
-
-
Constructor Summary
Constructors Constructor Description UnifiedHighlighter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHighlight(MappedFieldType fieldType)protected static StringconvertFieldValue(MappedFieldType type, Object value)protected AnalyzergetAnalyzer(DocumentMapper docMapper, FetchSubPhase.HitContext hitContext)protected BreakIteratorgetBreakIterator(SearchContextHighlight.Field field)protected UnifiedHighlighter.OffsetSourcegetOffsetSource(MappedFieldType fieldType)protected PassageFormattergetPassageFormatter(FetchSubPhase.HitContext hitContext, SearchContextHighlight.Field field, Encoder encoder)HighlightFieldhighlight(HighlighterContext highlighterContext)protected List<Object>loadFieldValues(MappedFieldType fieldType, SearchContextHighlight.Field field, QueryShardContext context, FetchSubPhase.HitContext hitContext, boolean forceSource)protected static StringmergeFieldValues(List<Object> fieldValues, char valuesSeparator)
-
-
-
Method Detail
-
canHighlight
public boolean canHighlight(MappedFieldType fieldType)
- Specified by:
canHighlightin interfaceHighlighter
-
highlight
public HighlightField highlight(HighlighterContext highlighterContext)
- Specified by:
highlightin interfaceHighlighter
-
getPassageFormatter
protected PassageFormatter getPassageFormatter(FetchSubPhase.HitContext hitContext, SearchContextHighlight.Field field, Encoder encoder)
-
getAnalyzer
protected Analyzer getAnalyzer(DocumentMapper docMapper, FetchSubPhase.HitContext hitContext)
-
loadFieldValues
protected List<Object> loadFieldValues(MappedFieldType fieldType, SearchContextHighlight.Field field, QueryShardContext context, FetchSubPhase.HitContext hitContext, boolean forceSource) throws IOException
- Throws:
IOException
-
getBreakIterator
protected BreakIterator getBreakIterator(SearchContextHighlight.Field field)
-
convertFieldValue
protected static String convertFieldValue(MappedFieldType type, Object value)
-
mergeFieldValues
protected static String mergeFieldValues(List<Object> fieldValues, char valuesSeparator)
-
getOffsetSource
protected UnifiedHighlighter.OffsetSource getOffsetSource(MappedFieldType fieldType)
-
-