tjake/Solandra — Issue #153: highlighting phrases
Author: kRyszard
Created: 2011-11-29 09:33:12+00:00
State: open

Is it possible to highlight whole query terms? f.e. when I ask for "United States" I want to get United States and not United States. I've searched the whole Internet for an answer, used all combinations of hl.mergeContiguous, hl.usePhrasesHighlighter and hl.highlightMultiTerm parameters and still cannot make it work.

my query is:
http://localhost:8983/solandra/idxPosts.proj350_139/select?q=post_text:"Janusz Palikot"&hl=true&hl.fl=post_text&hl.mergeContiguous=true&hl.usePhrasesHighlighter=true&hl.highlightMultiTerm=true

the answer is:
...
Tag: janusz palikot - Sowiniec: "Sowiniec"
...

my "post_text" field is:

my "text" type is:

I also tried to use FastVectorHighlighter with hl.useFastVectorHighlighter=true but encountered an error:
Problem accessing /solandra/idxPosts.proj350_139/select. Reason:

-6

java.lang.ArrayIndexOutOfBoundsException: -6
at lucandra.TermFreqVector.getOffsets(TermFreqVector.java:224)
at org.apache.lucene.search.vectorhighlight.FieldTermStack.(FieldTermStack.java:100)
at org.apache.lucene.search.vectorhighlight.FastVectorHighlighter.getFieldFragList(FastVectorHighlighter.java:175)
at org.apache.lucene.search.vectorhighlight.FastVectorHighlighter.getBestFragments(FastVectorHighlighter.java:166)
at org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingByFastVectorHighlighter(DefaultSolrHighlighter.java:509)
at org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:376)
at org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:116)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
...

Can you help me, please?