lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cario, Elaine" <Elaine.Ca...@wolterskluwer.com>
Subject Can't use 2 highlighting components in the same solrconfig
Date Fri, 02 May 2014 19:44:20 GMT
Hoping someone can help me...

I'm trying to use both the PostingsHighlighter and the FastVectorHighlighter in the same solrconfig
(selection driven by different request handlers), but once I define 2 search components in
the config, it always picks the Postings Highlighter (even if I never reference it in any
request handler).

Is this even possible to do?  (I'm using 4.7.1).

I think the culprit is some specific code in SolrCore.loadSearchComponents(), which specifically
overwrites the "highlighting" component with the contents of the "postingshighlight" component
- so the components map has 2 entries, but they both point to the same highlighting class
(the PostingsHighlighter).

It seems pretty deliberate (it only does it for the highlighter!), but wondering if there
is some reason to allow only one version of the highlighter to be used.

We're using 2 highlighters since the FVH is slow when creating snippets for a search result
list (10-50 documents), so we turned to the PH (which is definitely faster, even though it
doesn't keep phrases together, but that's a post for another day).  But we like FVH for highlighting
query terms in the full document, once the user clicks on a result.  The plan is to use the
PH in a search request handler, and the FVH in a document view request handler.

Thanks.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message