# Limiting facet fragments per match or term?

**URL:** <https://discuss.elastic.co/t/limiting-facet-fragments-per-match-or-term/14933>\
**Category:** Elasticsearch\
**Created:** [December 18, 2013, 12:36pm UTC](https://discuss.elastic.co/t/limiting-facet-fragments-per-match-or-term/14933 "2013-12-18T12:36:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![project2501](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@project2501](https://discuss.elastic.co/u/project2501)\
**Post date:** [December 18, 2013, 12:36pm UTC](https://discuss.elastic.co/t/limiting-facet-fragments-per-match-or-term/14933/1 "2013-12-18T12:36:07Z")

</div>

Hi,  
I am using matched\_fields for faceting.

The problem is this. I have 3 terms that are matched.

"cat","dog","book"

number\_of\_fragments set to 12

Instead of getting 4 highlights for each, I get 10 highlights for "cat"  
and 2 for "dog" and none left for "book".

Is there a way to limit the number of repeating highlight terms?

thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ce4d13a1-9f17-48fe-a388-72a21f5cfea3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ce4d13a1-9f17-48fe-a388-72a21f5cfea3%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:00am UTC](https://discuss.elastic.co/t/limiting-facet-fragments-per-match-or-term/14933/2 "2017-07-06T02:00:23Z")

</div>

Closed on July 6, 2017, 2:00am UTC


