You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Kranti K K Parisa <kr...@gmail.com> on 2010/08/18 10:36:05 UTC
Phrase Highlighting with special characters
Hi All,
I am trying with Solr Highlighting. I have problem in highlighting phrases
consists of special characters
for example, if I search for a phrase like "united. states. usa" then the
results are displayed matching the exact phrase and also without special
characters means "united states usa"
but highlights only the exact phrase which is "united. states. usa", the
results without special characters"united states usa" is not highlighted.
Can anyone give comments/suggestion.
Thanks, Kranti
Re: Phrase Highlighting with special characters
Posted by Kranti K K Parisa <kr...@gmail.com>.
Seems the following is working
query.setHighlight(true).setHighlightSnippets(1);
query.setHighlightSimplePre("<b>");
query.setHighlightSimplePost("</b>");
query.setHighlightFragsize(1000);
query.setParam("hl.fl", "<fieldname>");
also I was reading something about (I didn't use it yet)
<bool name="hl.usePhraseHighlighter">true</bool>
On Wed, Aug 18, 2010 at 2:06 PM, Kranti K K Parisa
<kr...@gmail.com>wrote:
> Hi All,
>
> I am trying with Solr Highlighting. I have problem in highlighting phrases
> consists of special characters
>
> for example, if I search for a phrase like "united. states. usa" then the
> results are displayed matching the exact phrase and also without special
> characters means "united states usa"
>
> but highlights only the exact phrase which is "united. states. usa", the
> results without special characters"united states usa" is not highlighted.
>
> Can anyone give comments/suggestion.
>
> Thanks, Kranti
>