# Highlight - Number of fragments not working

**URL:** https://discuss.elastic.co/t/highlight-number-of-fragments-not-working/201726
**Category:** Elasticsearch
**Created:** [October 1, 2019, 5:42am UTC](https://discuss.elastic.co/t/highlight-number-of-fragments-not-working/201726 "2019-10-01T05:42:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ilamparithi\_Karthike](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilamparithi_karthike/32/55156_2.png) [@Ilamparithi\_Karthike](https://discuss.elastic.co/u/Ilamparithi_Karthike)
#### Post date: [October 1, 2019, 5:42am UTC](https://discuss.elastic.co/t/highlight-number-of-fragments-not-working/201726/1 "2019-10-01T05:42:14Z")

</div>

Hi All,

Following is my mappings,  
[mappings](https://textuploader.com/1k5oh)

I am highlighting option for highlighting the results. It highlights only 5 occurrences of the keyword but in the JSON, I have 7+ keyword.  
I have gone through the docs, it shows we need to add  
// number\_of\_fragments:10

I have provided the same in the search query, but only returning 5 highlighted words only.

**Result:**  
`{"data_source.keyword":["<em>CFR</em>"],"appendix":["However, under <em>Regulation</em> <em>C</em> the definition of an application does not include prequalification requests","In either case, <em>Regulation</em> <em>C</em> does not require an institution to report prequalification requests on the","The phrase extension of credit thus is defined differently under <em>Regulation</em> <em>C</em> than under Regulation B","For all purposes under <em>Regulation</em> <em>C</em>, if an MSA is divided by OMB into MDs, the appropriate geographic","The business-purpose transaction is an open-end line of credit under <em>Regulation</em> <em>C</em>, provided the other"],"level.keyword":["<em>APPENDIX</em>"]}`

**original json:**  
[original json](http://s000.tinyupload.com/?file_id=58492740426359328990)

**search query:**  
[search query](https://textuploader.com/1k5om)

Can anyone help me with this?

---

<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 29, 2019, 5:42am UTC](https://discuss.elastic.co/t/highlight-number-of-fragments-not-working/201726/2 "2019-10-29T05:42:16Z")

</div>

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