Hallo Vinod!
My name is Leonardo.
I think you need to compare the schema.xml configuration in both versions. Pay 
attention to the fields like fullText_public and fullText_intern and how they 
are tokenized.


Second: See the highlighting implementation/engine to use


And maybe you need to adjust the highlightMultiTerm configuration to True

<highlighting>
    <highlightMultiTerm>true</highlightMultiTerm>

References:
- https://solr.apache.org/guide/solr/latest/query-guide/highlighting.html

Regards
Leonardo F. Bauchwitz


________________________________________
Von: Vinodgupta Mummidisetti <vinodgupta.mummidise...@clarivate.com>
Gesendet: Donnerstag, 6. Februar 2025 03:35
An: solr-u...@lucene.apache.org
Cc: dev@solr.apache.org
Betreff: Discrepancy in Search Highlighting Between Apache Solr 6.6 and 9.7

Subject: Discrepancy in Search Highlighting Between Apache Solr 6.6 and 9.7

Dear Solr Team,

I hope you are doing well.

My name is Vinod Gupta, and I am a Full Stack Development Engineer at Clarivate 
Analytics Pvt Ltd, Bangalore, India.

In our application, we have been using Apache Solr 6.6 for search and indexing.
Recently, we decided to drop Apache Solr 6.6 and use  Apache Solr 9.7 and have 
successfully created indices in the new system.

A sample index structure in Solr 9.7 is as follows:

json
"docs": [{
  "entityId": "1377668",
  "entityName": "Card",
  "docType": "fullIndex",
  "docId": "fullIndex-card-1377668",
  "fullText_public": [
    "Caban", "Irvin",
    "Caban, Irvin - Department of Applied Physics (Active)",
    "Caban, Irvin - Institut für Angewandte Physik (Aktiv)"
  ],
  "fullText_intern": [
    "Caban", "Irvin",
    "Caban, Irvin - Department of Applied Physics (Active)",
    "Caban, Irvin - Institut für Angewandte Physik (Aktiv)"
  ],
  "_version_": 1823199209666379787,
  "timestamp_now": "2025-02-05T06:50:59.911Z"
}]


However, we have noticed a discrepancy in search highlighting between Solr 6.6 
and Solr 9.7.

Query Executed in the Solr UI:

(fullText_public:(Caban* )) AND (entityName: (Card* ))


Response in Solr 6.6:
json
"highlighting": {
  "fullIndex-card-1377668": {
    "fullText_intern": ["<em>Caban, Irvin - Department of Applied Physics 
(Active)</em>"]
  }
}


Response in Solr 9.7:
json
"highlighting": {
  "fullIndex-card-1377668": {
    "fullText_intern": ["<em>Caban</em>"]
  }
}


Problem:
The highlighting behavior differs between the two versions. In Solr 6.6, the 
full phrase "Caban, Irvin - Department of Applied Physics (Active)" is 
highlighted, whereas in Solr 9.7, only "Caban" is highlighted.

Could you please provide guidance on this issue? Is there any configuration 
change or update in Solr 9.7 that might be affecting the highlighting behavior?

Looking forward to your insights.

Best regards,
Vinod Gupta
Full Stack Development Engineer
Clarivate Analytics Pvt Ltd, Bangalore, India

---

This version is professional, structured, and clearly communicates the issue. 
Let me know if youd like any modifications! 🚀

Confidentiality note: This e-mail may contain confidential information from 
Clarivate. If you are not the intended recipient, be aware that any disclosure, 
copying, distribution or use of the contents of this e-mail is strictly 
prohibited. If you have received this e-mail in error, please delete this 
e-mail and notify the sender as soon as possible.

Reply via email to