Search in sources :

Example 1 with FastVectorHighlighter

use of org.opensearch.search.fetch.subphase.highlight.FastVectorHighlighter in project OpenSearch by opensearch-project.

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("unified", new UnifiedHighlighter());
    highlighters.extractAndRegister(plugins, SearchPlugin::getHighlighters);
    return unmodifiableMap(highlighters.getRegistry());
}
Also used : NamedRegistry(org.opensearch.common.NamedRegistry) SearchPlugin(org.opensearch.plugins.SearchPlugin) UnifiedHighlighter(org.opensearch.search.fetch.subphase.highlight.UnifiedHighlighter) PlainHighlighter(org.opensearch.search.fetch.subphase.highlight.PlainHighlighter) FastVectorHighlighter(org.opensearch.search.fetch.subphase.highlight.FastVectorHighlighter) Highlighter(org.opensearch.search.fetch.subphase.highlight.Highlighter) FastVectorHighlighter(org.opensearch.search.fetch.subphase.highlight.FastVectorHighlighter) PlainHighlighter(org.opensearch.search.fetch.subphase.highlight.PlainHighlighter) UnifiedHighlighter(org.opensearch.search.fetch.subphase.highlight.UnifiedHighlighter)

Aggregations

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