[ 
https://issues.apache.org/jira/browse/SOLR-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yoni Amir updated SOLR-3919:
----------------------------

    Description: 
I am using a configuration roughly as follows:

       <bool name="hl.usePhraseHighlighter">true</bool>
       <bool name="hl.highlightMultiTerm">true</bool>
       <int name="hl.snippets">4</int>
       <bool name="hl.mergeContiguous">true</bool>

I found a strange case as follows:
I have only 1 hit in the field, so I expect that no merging will take place. 
However, solr returns a highlight snippet of length 400. In effect, it 
calculates the hl.snippet size times 100. With hl.snippet=10, the length is 
1000. I think it is because hl.fragsize is 100 by default.

This occurs only if the hit is sufficiently close to the beginning of the 
field's text - that is, if it is between the 300th and 400th character. In that 
change, the first four 100-block size snippets are merged as if all of them 
have a hit.

This behavior is wrong, and if there is only one hit, I don't expect solr to 
merge anything for me.

  was:
I am using a configuration roughly as follows:

       <bool name="hl.usePhraseHighlighter">true</bool>
       <bool name="hl.highlightMultiTerm">true</bool>
       <int name="hl.snippets">4</int>
       <bool name="hl.mergeContiguous">true</bool>
I found a strange case as follows:

I have only 1 hit in the field, so I expect that no merging will take place. 
However, solr returns a highlight snippet of length 400. In effect, it 
calculates the hl.snippet size times 100. With hl.snippet=10, the length is 
1000. I think it is because hl.fragsize is 100 by default.

This occurs only if the hit is sufficiently close to the beginning of the 
field's text - that is, if it is between the 300th and 400th character. In that 
change, the first four 100-block size snippets are merged as if all of them 
have a hit.

This behavior is wrong, and if there is only one hit, I don't expect solr to 
merge anything for me.

    
> Problem with hl.mergeContinuous - snippet is too long but only one hit
> ----------------------------------------------------------------------
>
>                 Key: SOLR-3919
>                 URL: https://issues.apache.org/jira/browse/SOLR-3919
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 4.0-BETA
>         Environment: win xp, java 7
>            Reporter: Yoni Amir
>
> I am using a configuration roughly as follows:
>        <bool name="hl.usePhraseHighlighter">true</bool>
>        <bool name="hl.highlightMultiTerm">true</bool>
>        <int name="hl.snippets">4</int>
>        <bool name="hl.mergeContiguous">true</bool>
> I found a strange case as follows:
> I have only 1 hit in the field, so I expect that no merging will take place. 
> However, solr returns a highlight snippet of length 400. In effect, it 
> calculates the hl.snippet size times 100. With hl.snippet=10, the length is 
> 1000. I think it is because hl.fragsize is 100 by default.
> This occurs only if the hit is sufficiently close to the beginning of the 
> field's text - that is, if it is between the 300th and 400th character. In 
> that change, the first four 100-block size snippets are merged as if all of 
> them have a hit.
> This behavior is wrong, and if there is only one hit, I don't expect solr to 
> merge anything for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to