[opencms-dev] FW: Solr and Term Highlighting

FRASER, JORGE jfraser at valspar.com
Wed Jan 14 22:44:54 CET 2015


I debugged the code and found that in org.opencms.search.solr.CmsSolrIndex under the search method line# 618 they have the following line:

query.setHighlight(false);

I changed it to true and it worked. Now I am wondering if this was done with a specific reason in mind or if it was an oversight. Regardless, highlighting is hard-coded not to work ever regardless of what parameters you pass in the search query.



Jorge Fraser
Systems Architect/Web Application Developer, Global Marketing Solutions
Phone: (612)851-7309
Email: jfraser at valspar.com
Physical Address:                                Mailing Address:
901 3rd Avenue South                           PO Box 1461
Minneapolis, MN 55402                        Minneapolis, MN 55440
[Valspar_Tag_5405-earthsense]

From: FRASER, JORGE
Sent: Wednesday, January 14, 2015 10:45 AM
To: opencms-dev at opencms.org
Subject: Solr and Term Highlighting

I have a 9.0.1 installation of Opncms and I am trying to use the Highlighting features of solr with no success. I use solr for other sites that we have so I am familiar with the syntax. Here is a sample request:

http://dev.site.com/ handleSolrSelect? q=test&wt=json&hl=true&indent=on&hl.fl=content_en&hl.simple.pre=%3Cem%3E&hl.simple.post=%3C%2Fem%3E&hl.highlightMultiTerm=true&hl.fragsize=500&fl=*%2Cscore&rows=5

I get all the information except for the highlight section. Any help will be greatly appreciated.


Jorge Fraser
Systems Architect/Web Application Developer, Global Marketing Solutions
Phone: (612)851-7309
Email: jfraser at valspar.com<mailto:jfraser at valspar.com>
Physical Address:                                Mailing Address:
901 3rd Avenue South                           PO Box 1461
Minneapolis, MN 55402                        Minneapolis, MN 55440
[Valspar_Tag_5405-earthsense]


This transmission may contain confidential or privileged information; unauthorized use is prohibited.
Transactions are subject to the terms found at http://www.coatings.com/notice.jsp

This transmission may contain confidential or privileged information; unauthorized use is prohibited. 
Transactions are subject to the terms found at http://www.coatings.com/notice.jsp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150114/0fd251b0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 5331 bytes
Desc: image001.gif
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150114/0fd251b0/attachment.gif>


More information about the opencms-dev mailing list