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 Romi <ro...@gmail.com> on 2011/06/18 11:26:29 UTC

solr highliting feature

I want to highlight some search result value. i used solr for this. as i
suppose solr provides highlighting feature. i used it i configure
highlighting in solr-config.xml. i set hl="true" and hl.fl="somefield" at
query time in my url when i run the url it gives me a xml representation of
search results where i got a tag <highliting>.

further i am parsing this xml response to show result in a jsp page. but i
ma not getting how can i high lite the fields in jsp page

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/solr-highliting-feature-tp3079239p3079239.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solr highliting feature

Posted by Jan Høydahl <ja...@cominvent.com>.
Perhaps I don't understand your question right, but if you're working with the json response format, yes, you need to pull the highlighted version of the field from the highlighting section.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 20. juni 2011, at 07.22, Romi wrote:

> yes, I find title in <highlighting> section. If i am getting results say by
> parsing json object then do i need to parse <highlighting>?
> 
> -----
> Thanks & Regards
> Romi
> --
> View this message in context: http://lucene.472066.n3.nabble.com/solr-highliting-feature-tp3079239p3084890.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: solr highliting feature

Posted by Romi <ro...@gmail.com>.
yes, I find title in <highlighting> section. If i am getting results say by
parsing json object then do i need to parse <highlighting>?

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/solr-highliting-feature-tp3079239p3084890.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solr highliting feature

Posted by Jan Høydahl <ja...@cominvent.com>.
Hi,

First, you should consider SolrJ API if you're working from Java/JSP.

Then, say you want to highlight title. In you loop across the N hits, instead of pulling the title from the hits themselves, check if you find a highlighted result with the same ID in the <highlighting> section.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 18. juni 2011, at 11.26, Romi wrote:

> I want to highlight some search result value. i used solr for this. as i
> suppose solr provides highlighting feature. i used it i configure
> highlighting in solr-config.xml. i set hl="true" and hl.fl="somefield" at
> query time in my url when i run the url it gives me a xml representation of
> search results where i got a tag <highliting>.
> 
> further i am parsing this xml response to show result in a jsp page. but i
> ma not getting how can i high lite the fields in jsp page
> 
> -----
> Thanks & Regards
> Romi
> --
> View this message in context: http://lucene.472066.n3.nabble.com/solr-highliting-feature-tp3079239p3079239.html
> Sent from the Solr - User mailing list archive at Nabble.com.