# Error In Docs Regarding number\_of\_fragments

**URL:** <https://discuss.elastic.co/t/error-in-docs-regarding-number-of-fragments/4256>\
**Category:** Elasticsearch\
**Created:** [April 19, 2011, 5:20pm UTC](https://discuss.elastic.co/t/error-in-docs-regarding-number-of-fragments/4256 "2011-04-19T17:20:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timscott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timscott/32/3220_2.png) [@timscott](https://discuss.elastic.co/u/timscott)\
**Post date:** [April 19, 2011, 5:20pm UTC](https://discuss.elastic.co/t/error-in-docs-regarding-number-of-fragments/4256/1 "2011-04-19T17:20:27Z")

</div>

FYI...

I saw this in the docs:

"If the number\_of\_fragments value is set to 0 then no fragments are  
produced, instead the whole content of the field is returned, and of  
course it is highlighted."

This did not work for me. It returned no highlights. Through trial  
and error, I discovered that setting number\_of\_fragments to -1 does  
exhibit this behavior.

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [April 19, 2011, 6:53pm UTC](https://discuss.elastic.co/t/error-in-docs-regarding-number-of-fragments/4256/2 "2011-04-19T18:53:34Z")

</div>

Hi,

interesting, do you think you can provide recreation script for this? I am  
using value 0 and it works as expected, also I can see that there are some  
tests in ES using value 0 as well.

Regards,  
Lukas

On Tue, Apr 19, 2011 at 7:20 PM, Tim Scott [tscott@lunaversesoftware.com](mailto:tscott@lunaversesoftware.com)wrote:

> FYI...
> 
> I saw this in the docs:
> 
> "If the number\_of\_fragments value is set to 0 then no fragments are  
> produced, instead the whole content of the field is returned, and of  
> course it is highlighted."
> 
> This did not work for me. It returned no highlights. Through trial  
> and error, I discovered that setting number\_of\_fragments to -1 does  
> exhibit this behavior.

---

<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 6, 2017, 4:08am UTC](https://discuss.elastic.co/t/error-in-docs-regarding-number-of-fragments/4256/3 "2017-07-06T04:08:03Z")

</div>


