# No\_match\_size does not work

**URL:** https://discuss.elastic.co/t/no-match-size-does-not-work/136749
**Category:** Elasticsearch
**Created:** [June 20, 2018, 6:23pm UTC](https://discuss.elastic.co/t/no-match-size-does-not-work/136749 "2018-06-20T18:23:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![totessusan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/totessusan/32/13028_2.png) [@totessusan](https://discuss.elastic.co/u/totessusan)
#### Post date: [June 20, 2018, 6:23pm UTC](https://discuss.elastic.co/t/no-match-size-does-not-work/136749/1 "2018-06-20T18:23:44Z")

</div>

I want to return the first n characters of the field if nothing returns from the highlight query - this should technically be covered by the no\_match\_size functionality, but it doesn't seem to be working.

no\_match\_size  
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight. Defaults to 0 (nothing is returned).  
Source: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html)

My problem is exactly like a previous post here that was never answered: [Highlighter doesn't work with custom \_all field and no\_match\_size](https://discuss.elastic.co/t/highlighter-doesnt-work-with-custom-all-field-and-no-match-size/107031).

Does anyone know how to get this working, have any insights, or confirmation that this is a bug? Thanks!

---

<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: [July 18, 2018, 6:23pm UTC](https://discuss.elastic.co/t/no-match-size-does-not-work/136749/2 "2018-07-18T18:23:51Z")

</div>

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