Search in sources :

Example 1 with DefaultSolrHighlighter

use of org.apache.solr.highlight.DefaultSolrHighlighter in project lucene-solr by apache.

the class HighlightComponent method inform.

@Override
public void inform(SolrCore core) {
    List<PluginInfo> children = info.getChildren("highlighting");
    if (children.isEmpty()) {
        //TODO deprecated configuration remove later
        PluginInfo pluginInfo = core.getSolrConfig().getPluginInfo(SolrHighlighter.class.getName());
        if (pluginInfo != null) {
            solrConfigHighlighter = core.createInitInstance(pluginInfo, SolrHighlighter.class, null, DefaultSolrHighlighter.class.getName());
        } else {
            DefaultSolrHighlighter defHighlighter = new DefaultSolrHighlighter(core);
            defHighlighter.init(PluginInfo.EMPTY_INFO);
            solrConfigHighlighter = defHighlighter;
        }
    } else {
        solrConfigHighlighter = core.createInitInstance(children.get(0), SolrHighlighter.class, null, DefaultSolrHighlighter.class.getName());
    }
}
Also used : UnifiedSolrHighlighter(org.apache.solr.highlight.UnifiedSolrHighlighter) DefaultSolrHighlighter(org.apache.solr.highlight.DefaultSolrHighlighter) SolrHighlighter(org.apache.solr.highlight.SolrHighlighter) PostingsSolrHighlighter(org.apache.solr.highlight.PostingsSolrHighlighter) DefaultSolrHighlighter(org.apache.solr.highlight.DefaultSolrHighlighter) PluginInfo(org.apache.solr.core.PluginInfo)

Aggregations

PluginInfo (org.apache.solr.core.PluginInfo)1 DefaultSolrHighlighter (org.apache.solr.highlight.DefaultSolrHighlighter)1 PostingsSolrHighlighter (org.apache.solr.highlight.PostingsSolrHighlighter)1 SolrHighlighter (org.apache.solr.highlight.SolrHighlighter)1 UnifiedSolrHighlighter (org.apache.solr.highlight.UnifiedSolrHighlighter)1