We are using Solr 7.2.1, highlighting is not working with docValues only String 
field.

Should I open a JIRA for this?

Schema:
<schema name="core" version="1.6">
  <uniqueKey>id</uniqueKey>
  <fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
  <field name="id" type="string" docValues="true" indexed="true" 
required="true"/>
  <field name="name" type="string" docValues="false" indexed="true" 
stored="true"/>
  <field name="name1" type="string" docValues="true" indexed="true" 
stored="false"/>
  <copyField source="name" dest="name1"/>
</schema>

Data:
[{"id":1,"name":"Testing line 1"},{"id":2,"name":"Testing line 
2"},{"id":3,"name":"Testing line 3"}]

Query:
http://localhost:8983/solr/test/select?q=Testing*&df=name&hl=true&hl.fl=name,name1

Response:
{"response":{"numFound":3,"start":0,"docs":[{"id":"1","name":"Testing line 
1","name1":"Testing line 1"},{"id":"2","name":"Testing line 2","name1":"Testing 
line 2"},{"id":"3","name":"Testing line 3","name1":"Testing line 
3"}]},"highlighting":{"1":{"name":["<em>Testing line 
1</em>"]},"2":{"name":["<em>Testing line 2</em>"]},"3":{"name":["<em>Testing 
line 3</em>"]}}}


With Thanks & Regards
Karthik Ramachandran
P Please don't print this e-mail unless you really need to

***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

Reply via email to