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 Spadez <ja...@hotmail.com> on 2012/09/19 18:30:22 UTC
Journey to enable highlighting
Hi,
So I want to enable highlighting on my results. When I run the query like
this:
http://localhost:8080/solr/select?q=book&hl=true
I don't get any highlighted results. I am assuming that more is needed to
actually enable highlighting. Commented out at the bottom of my
solrconfig.xml is this:
*Default configuration in a requestHandler would look like:
<arr name="components">
<str>query</str>
<str>facet</str>
<str>mlt</str>
<str>highlight</str>
<str>stats</str>
<str>debug</str>
</arr>*
Is it right that to enable highlighting, I would need to uncomment out this
section, to leave just this shown?:
*Default configuration in a requestHandler would look like:
<arr name="components">
<str>highlight</str>
</arr>*
--
View this message in context: http://lucene.472066.n3.nabble.com/Journey-to-enable-highlighting-tp4008952.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Journey to enable highlighting
Posted by Ahmet Arslan <io...@yahoo.com>.
> So I want to enable highlighting on my results. When I run
> the query like
> this:
>
> http://localhost:8080/solr/select?q=book&hl=true
Try explicitly setting the field(s) that you want to highlight.
To enable highlighting your field must me stored="true"
See : http://wiki.apache.org/solr/FieldOptionsByUseCase
Examine other parameters : http://wiki.apache.org/solr/HighlightingParameters
For example, sometimes you may need to increase hl.maxAnalyzedChars .
> I don't get any highlighted results. I am assuming that more
> is needed to
> actually enable highlighting. Commented out at the bottom of
> my
> solrconfig.xml is this:
>
> *Default configuration in a requestHandler would look like:
> <arr
> name="components">
>
> <str>query</str>
>
> <str>facet</str>
>
> <str>mlt</str>
>
> <str>highlight</str>
>
> <str>stats</str>
>
> <str>debug</str>
> </arr>*
>
> Is it right that to enable highlighting, I would need to
> uncomment out this
> section, to leave just this shown?:
>
> *Default configuration in a requestHandler would look like:
> <arr
> name="components">
>
> <str>highlight</str>
> </arr>*
You do not need to change/edit <arr name="components"> section. highlighting component (and query, facet, mlt etc) is registered by default.