Solr highlights each word separately for a phrase request

Let's say I have a field in Solr that reads "The rain in Spain falls mostly on the plain."

And I want a highlighted result for the phrase "mostly hits".

I am passing these parameters to select ...

<lst name="params">
    <str name="hl.fragsize">-1</str>
    <str name="q">"falls mainly"</str>
    <str name="hl.q">"falls mainly"</str>
    <str name="hl.simple.pre">@@pre@@</str>
    <str name="hl.simple.post">@@post@@</str>
    <str name="hl.fl">note</str>
    <str name="hl.maxAnalyzedChars">-1</str>
    <str name="hl">true</str>
    <str name="rows">2147483647</str>
</lst>

      

And the response is returned with each phrase word individually highlighted ...

    <lst name="highlighting">
        <lst name="test">
            <arr name="note">
                <str>
The rain in Spain @@pre@@falls@@post@@ @@pre@@mainly@@post@@ in the plain.
                </str>
            </arr>
        </lst>
    </lst>

      

I would expect the phrase to be highlighted ...

    <lst name="highlighting">
        <lst name="test">
            <arr name="note">
                <str>
The rain in Spain @@pre@@falls mainly@@post@@ in the plain.
                </str>
            </arr>
        </lst>
    </lst>

      

I am using Solr version 4.0.

+1
lucene solr


source to share


No one has answered this question yet

See similar questions:

five
Solr - query query expression
3
Solr: how to highlight an entire search phrase?

or similar:

101
How do I request SOLR for empty fields?
72
using OR and NOT in solr query
42
Getting specific fields in a Solr query?
five
Solr - query query expression
3
Solr version 4.1. Messages. The SolrHighlighter function does not work.
2
SOLR generates phrasal requests for punctuation
1
Solrcloud problem
0
Type approval SOLR eDismax for phrases
0
Apache Solr multiple phrase requests with OR
0
Solr Syntax for Phrase Request



All Articles
Loading...
X
Show
Funny
Dev
Pics