I may be wrong here, but the problem may be that the match was on your
terms pos1 and pos2 (you don't need the pos3 term to match, due to the
OR operator) and thus that's what's been highlighted.
There's a hl.q parameter that lets you supply a different query for
highlighting to the one you're using for searching, perhaps that could
have a different and more forgiving pattern that made sure all your
terms were highlighted?
Also, the XML didn't come through as this list strips attachments.
Best
Charlie
On 31/03/2020 19:27, Anil Shingala wrote:
Hello Dev Team,
I found some problem in highlighting module. Not all the search terms
are getting highlighted.
Sample query: q={!complexphrase+inOrder=true}"pos1 (pos2 OR
pos3)"~30&hl=true
Indexed text: "pos1 pos2 pos3 pos4"
please find attached response xml screen shot from solr.
You can see that only two terms are highlighted like, "<em>pos1</em>
<em>pos2</em> pos3 pos4"
The scenario is same in Solr source code since long time (I have
checked in Solr version 4 to version 7). The scenario is when term
positions are in-order in document and query both.
Please let me know your view on this.
Regards,
Anil Shingala
*Knovos*
10521 Rosehaven Street, Suite 300 | Fairfax, VA 22030 (USA)
Office +1 703.226.1505
Main +1 703.226.1500 | +1 877.227.5457
/ashing...@knovos.com/
<mailto:ashing...@knovos.com>/_|_//www.knovos.com/
<http://www.knovos.com/>
Washington DC | New York | London | Paris | Gandhinagar | Tokyo
/Knovos was formerly also known as Capital Novus or Capital Legal
Solutions. The information contained in this email message may be
confidential or legally privileged. If you are not the intended
recipient, please advise the sender by replying to this email and by
immediately deleting all copies of this message and any attachments.
Knovos, LLC is not authorized to practice law./
--
Charlie Hull
OpenSource Connections, previously Flax
tel/fax: +44 (0)8700 118334
mobile: +44 (0)7767 825828
web: www.o19s.com