I experimented locally with modifying the SolrCore code to not overwrite the highlight component in the components map (essentially, leaving the components as configured in the solrconfig.xml). This seemed to work - my search request handler used the PostingsHighlighter to generate snippets with query terms highlighted, and the view request handler used the FastVectorHighlighter to highlight the query terms in the full document.
I'm kind of new at this (Solr), so before I go off half-cocked and submit a bug report, was wondering if anyone had any insight if the single highlighter per config behavior is by design? Thanks in advance. From: Cario, Elaine Sent: Friday, May 02, 2014 3:44 PM To: 'solr-user@lucene.apache.org' Subject: Can't use 2 highlighting components in the same solrconfig 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.