# Multi Search with Count greater than 10000

**URL:** https://discuss.elastic.co/t/multi-search-with-count-greater-than-10000/218257
**Category:** Elasticsearch
**Created:** [February 6, 2020, 11:40pm UTC](https://discuss.elastic.co/t/multi-search-with-count-greater-than-10000/218257 "2020-02-06T23:40:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![xavierstein](https://avatars.discourse-cdn.com/v4/letter/x/53a042/32.png) [@xavierstein](https://discuss.elastic.co/u/xavierstein)
#### Post date: [February 6, 2020, 11:40pm UTC](https://discuss.elastic.co/t/multi-search-with-count-greater-than-10000/218257/1 "2020-02-06T23:40:22Z")

</div>

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 `_id`s 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](https://discuss.elastic.co/t/is-there-a-multi-count-api-in-es/109394)

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

Thanks!

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [February 7, 2020, 2:53pm UTC](https://discuss.elastic.co/t/multi-search-with-count-greater-than-10000/218257/2 "2020-02-07T14:53:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![xavierstein](https://avatars.discourse-cdn.com/v4/letter/x/53a042/32.png) [@xavierstein](https://discuss.elastic.co/u/xavierstein)
#### Post date: [February 7, 2020, 7:31pm UTC](https://discuss.elastic.co/t/multi-search-with-count-greater-than-10000/218257/3 "2020-02-07T19:31:47Z")

</div>

Thanks, this works great!

---

<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: [March 6, 2020, 7:31pm UTC](https://discuss.elastic.co/t/multi-search-with-count-greater-than-10000/218257/4 "2020-03-06T19:31:55Z")

</div>

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