Multi Search with Count greater than 10000

Hello,

I have two elasticsearch queries that I would like to combine into one using the _msearch endpoint. The first one is a normal query to filter by _ids and the second is a _count query.

Now I know I am able to combine these using the size: 0 parameter in my request body, but the issue is that it will only return a value up to 10000, but the _count query will return a larger number.

The above solution is described here: Is there a "Multi Count API" in ES

Is there anyway to get a true count using a multisearch?

Thanks!

See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/search-request-body.html#request-body-search-track-total-hits

Thanks, this works great!

1 Like

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