Total Hits in collapse has an upperbound of 10,000

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:

"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.

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