# Highlight not worked when use script\_score

**URL:** <https://discuss.elastic.co/t/highlight-not-worked-when-use-script-score/198509>\
**Category:** Elasticsearch\
**Created:** [September 7, 2019, 2:20pm UTC](https://discuss.elastic.co/t/highlight-not-worked-when-use-script-score/198509 "2019-09-07T14:20:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![111205](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111205/32/53755_2.png) [@111205](https://discuss.elastic.co/u/111205)\
**Post date:** [September 7, 2019, 2:20pm UTC](https://discuss.elastic.co/t/highlight-not-worked-when-use-script-score/198509/1 "2019-09-07T14:20:36Z")

</div>

**Elasticsearch version** ( `bin/elasticsearch --version` ): 7.3.1

**Plugins installed** : ["ikAnalyse"]

**JVM version** ( `java -version` ):1.7

**OS version** ( `uname -a` if on a Unix-like system):centos7

**Description of the problem including expected versus actual behavior** :

hightlight not worked when use script\_score，highlight not found in the response

if i used function\_score it works fine

GET company/\_search  
{  
"query": {  
"script\_score":{  
"query": {  
"multi\_match": {  
"query": "有限公司",  
"fields": ["companyName^5","historyName^4","companyDesc"],  
"minimum\_should\_match": "4\<50%"  
}  
},  
"script":{  
"source":"1"  
}  
}  
},  
"highlight": {  
"fields": {"companyName": {},"companyDesc": {},"historyName":{}}  
}  
}

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [September 13, 2019, 6:26pm UTC](https://discuss.elastic.co/t/highlight-not-worked-when-use-script-score/198509/2 "2019-09-13T18:26:14Z")

</div>

Thanks for the report. This is a [known issue](https://github.com/elastic/elasticsearch/issues/46471) and should be fixed in [7.4.0](https://github.com/elastic/elasticsearch/pull/46507).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 11, 2019, 6:26pm UTC](https://discuss.elastic.co/t/highlight-not-worked-when-use-script-score/198509/3 "2019-10-11T18:26:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
