Search in sources :

Example 1 with FastVectorHighlighter

use of org.elasticsearch.search.fetch.subphase.highlight.FastVectorHighlighter in project elasticsearch by elastic.

the class SearchModule method setupHighlighters.

private Map<String, Highlighter> setupHighlighters(Settings settings, List<SearchPlugin> plugins) {
    NamedRegistry<Highlighter> highlighters = new NamedRegistry<>("highlighter");
    highlighters.register("fvh", new FastVectorHighlighter(settings));
    highlighters.register("plain", new PlainHighlighter());
    highlighters.register("postings", new PostingsHighlighter());
    highlighters.register("unified", new UnifiedHighlighter());
    highlighters.extractAndRegister(plugins, SearchPlugin::getHighlighters);
    return unmodifiableMap(highlighters.getRegistry());
}
Also used : NamedRegistry(org.elasticsearch.common.NamedRegistry) SearchPlugin(org.elasticsearch.plugins.SearchPlugin) PostingsHighlighter(org.elasticsearch.search.fetch.subphase.highlight.PostingsHighlighter) UnifiedHighlighter(org.elasticsearch.search.fetch.subphase.highlight.UnifiedHighlighter) PlainHighlighter(org.elasticsearch.search.fetch.subphase.highlight.PlainHighlighter) FastVectorHighlighter(org.elasticsearch.search.fetch.subphase.highlight.FastVectorHighlighter) FastVectorHighlighter(org.elasticsearch.search.fetch.subphase.highlight.FastVectorHighlighter) UnifiedHighlighter(org.elasticsearch.search.fetch.subphase.highlight.UnifiedHighlighter) PlainHighlighter(org.elasticsearch.search.fetch.subphase.highlight.PlainHighlighter) Highlighter(org.elasticsearch.search.fetch.subphase.highlight.Highlighter) PostingsHighlighter(org.elasticsearch.search.fetch.subphase.highlight.PostingsHighlighter)

Aggregations

NamedRegistry (org.elasticsearch.common.NamedRegistry)1 SearchPlugin (org.elasticsearch.plugins.SearchPlugin)1 FastVectorHighlighter (org.elasticsearch.search.fetch.subphase.highlight.FastVectorHighlighter)1 Highlighter (org.elasticsearch.search.fetch.subphase.highlight.Highlighter)1 PlainHighlighter (org.elasticsearch.search.fetch.subphase.highlight.PlainHighlighter)1 PostingsHighlighter (org.elasticsearch.search.fetch.subphase.highlight.PostingsHighlighter)1 UnifiedHighlighter (org.elasticsearch.search.fetch.subphase.highlight.UnifiedHighlighter)1