# Fragment highlighting size

**URL:** <https://discuss.elastic.co/t/fragment-highlighting-size/4714>\
**Category:** Elasticsearch\
**Created:** [June 27, 2011, 11:25am UTC](https://discuss.elastic.co/t/fragment-highlighting-size/4714 "2011-06-27T11:25:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johno\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johno_2/32/3191_2.png) [@johno\_2](https://discuss.elastic.co/u/johno_2)\
**Post date:** [June 27, 2011, 11:25am UTC](https://discuss.elastic.co/t/fragment-highlighting-size/4714/1 "2011-06-27T11:25:51Z")

</div>

Hi there,

I am using highlighter, but getting only first 5 characters before  
match. e.g. searching for "siemens" I get fragment "ffice siemens  
hipath 3700..." - and modifying fragment size only makes fragment  
longer. is there any way to control how much text should be around/  
before a highlighted match?

johno

---

<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:02am UTC](https://discuss.elastic.co/t/fragment-highlighting-size/4714/2 "2017-07-06T04:02:33Z")

</div>


