# Total Hits in collapse has an upperbound of 10,000

**URL:** <https://discuss.elastic.co/t/total-hits-in-collapse-has-an-upperbound-of-10-000/240743>\
**Category:** Elasticsearch\
**Created:** [July 10, 2020, 6:43pm UTC](https://discuss.elastic.co/t/total-hits-in-collapse-has-an-upperbound-of-10-000/240743 "2020-07-10T18:43:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apurvnerlekar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apurvnerlekar/32/45459_2.png) [@apurvnerlekar](https://discuss.elastic.co/u/apurvnerlekar)\
**Post date:** [July 10, 2020, 6:43pm UTC](https://discuss.elastic.co/t/total-hits-in-collapse-has-an-upperbound-of-10-000/240743/1 "2020-07-10T18:43:16Z")

</div>

Hello,  
I am observing that the total\_hits in collapse field has an upperbound of 10,000. We have certain use-cases when we do use collapse and retrieve the total number of hits in it. If the inner\_hits are more than 10,000, ES just returns 10,000 as the count.

We do set track\_total\_hits at parent level to be true/MAX\_INT, so as to get the exact count, and it works fine for the parent documents. I was not able to see how to set the track\_total\_hits inside collapse itself.

Sample response:

```auto
"inner_hits": {
                    "collapse_hits": {
                        "hits": {
                            "total": {
                                "value": 10000,
                                "relation": "gte"
                            },
                            "max_score": null,
                            "hits": []
                        }
                    }
                }    

```

Our cluster versions: 7.1.0, about to move to 7.7.0  
Is this a limitation or a bug on elasticsearch side? Any help with the related information is highly appreciated.

---

<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:** [August 7, 2020, 6:43pm UTC](https://discuss.elastic.co/t/total-hits-in-collapse-has-an-upperbound-of-10-000/240743/2 "2020-08-07T18:43:20Z")

</div>

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