# Highlighter doesn't work with custom \_all field and no\_match\_size

**URL:** https://discuss.elastic.co/t/highlighter-doesnt-work-with-custom-all-field-and-no-match-size/107031
**Category:** Elasticsearch
**Created:** [November 9, 2017, 11:28am UTC](https://discuss.elastic.co/t/highlighter-doesnt-work-with-custom-all-field-and-no-match-size/107031 "2017-11-09T11:28:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aslamy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aslamy/32/18254_2.png) [@aslamy](https://discuss.elastic.co/u/aslamy)
#### Post date: [November 9, 2017, 11:28am UTC](https://discuss.elastic.co/t/highlighter-doesnt-work-with-custom-all-field-and-no-match-size/107031/1 "2017-11-09T11:28:05Z")

</div>

I have a custom \_all fields (content), the values of multiple fields are copied into this field (content) .

mapping:  
"content": {  
"type": "text",  
"store": true,  
"term\_vector": "with\_positions\_offsets",  
}  
In the case where there is a matching fragment to highlight, it returns a snippet of text. But In the case where there is no matching fragment to highlight, I want return a snippet of text from the beginning of the field. But it returns nothing.

Search:  
"content": {  
"fragment\_size" : 150,  
"number\_of\_fragments" : 2,  
"no\_match\_size": 250,  
"type": "fvh"  
}  
This happens when I copy more than one field to content. It works good when only one field is copied to content. I do not use any analyser.

How can I solve this problem ?

---

<div class="post-metadata">

### Author: ![aslamy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aslamy/32/18254_2.png) [@aslamy](https://discuss.elastic.co/u/aslamy)
#### Post date: [November 10, 2017, 2:09pm UTC](https://discuss.elastic.co/t/highlighter-doesnt-work-with-custom-all-field-and-no-match-size/107031/2 "2017-11-10T14:09:16Z")

</div>

I think this is a bug. I opened an issue on Elasticsearch git but they closed my issue and referred me to here. But I dont get any response even here.

---

<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: [December 8, 2017, 2:09pm UTC](https://discuss.elastic.co/t/highlighter-doesnt-work-with-custom-all-field-and-no-match-size/107031/3 "2017-12-08T14:09:16Z")

</div>

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