You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Karthik Ramachandran (JIRA)" <ji...@apache.org> on 2018/08/13 15:33:00 UTC

[jira] [Created] (SOLR-12663) Highlighting is not working with docValues only String fiel

Karthik Ramachandran created SOLR-12663:
-------------------------------------------

             Summary: Highlighting is not working with docValues only String fiel
                 Key: SOLR-12663
                 URL: https://issues.apache.org/jira/browse/SOLR-12663
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: highlighter
    Affects Versions: 7.2.1
            Reporter: Karthik Ramachandran


Highlighting is not working with docValues only String field.


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>"]}}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org