# Devtools only showing 10,000 hits

**URL:** <https://discuss.elastic.co/t/devtools-only-showing-10-000-hits/250663>\
**Category:** Kibana\
**Created:** [October 1, 2020, 11:51am UTC](https://discuss.elastic.co/t/devtools-only-showing-10-000-hits/250663 "2020-10-01T11:51:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chapmantrain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chapmantrain/32/22646_2.png) [@chapmantrain](https://discuss.elastic.co/u/chapmantrain)\
**Post date:** [October 1, 2020, 11:51am UTC](https://discuss.elastic.co/t/devtools-only-showing-10-000-hits/250663/1 "2020-10-01T11:51:40Z")

</div>

I have just installed Elasticsearch 7.8.0 on my laptop as a dev environment. I am using 6.8.10 in production. I have a dataset of around 600,000 documents however when I did a match\_all in devtools, its only showing 10,000 hits. Is there a setting I'm missing?

```auto
GET igemsbigdata-misc/_search
{
  "size": 0, 
  "query": {
    "match_all": {}
  }
}

```

```auto
{
  "took" : 0,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : null,
    "hits" : []
  }
}

```

Discover tells me: **672,750** hits

Sep 29, 2020 @ 02:39:06.615 - Oct 1, 2020 @ 17:56:02.215

To change the time, click the calendar icon in the navigation bar

---

<div class="post-metadata">

**Author:** ![jsu](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jsu](https://discuss.elastic.co/u/jsu)\
**Post date:** [October 1, 2020, 11:57am UTC](https://discuss.elastic.co/t/devtools-only-showing-10-000-hits/250663/2 "2020-10-01T11:57:26Z")

</div>

There is indeed a solution to this.

I will link to someone who already wrote about it very well somewhere else:

> <https://stackoverflow.com/questions/41655913/how-do-i-retrieve-more-than-10000-results-events-in-elastic-search/62499314#62499314>

But to summarize, you can either use the `"track_total_hits": true` variable, like this:

```auto
GET <index_name>/_search
{
    "size":1,
    "track_total_hits": true
}

```

or use the scroll API, like this:

```auto
 POST /<index_name>/_search?scroll=1m
{
"size": 100,
"query": {
    "match" : {
        "title" : "elasticsearch"
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![chapmantrain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chapmantrain/32/22646_2.png) [@chapmantrain](https://discuss.elastic.co/u/chapmantrain)\
**Post date:** [October 2, 2020, 7:25pm UTC](https://discuss.elastic.co/t/devtools-only-showing-10-000-hits/250663/3 "2020-10-02T19:25:23Z")

</div>

> [@chapmantrain](#):
>
> ```auto
> GET igemsbigdata-misc/_search
> {
> "size": 0, 
> "query": {
> "match_all": {}
> }
> }
> 
> ```

I'm not looking to retrieve the query, I need to know the number of documents. When I query the production cluster, it goes like this.

```auto
GET igemsbigdata-*/_search
{
  "size": 0, 
  "query": {
    "match_all": {}
  }
}

```

And I get.

```auto
{
  "took": 170,
  "timed_out": false,
  "_shards": {
    "total": 987,
    "successful": 987,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 33350663314,
    "max_score": 0,
    "hits": []
  }
}

```

So I know I have 33,350,663,314. I just need to know the total hits.

---

<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:** [October 30, 2020, 7:25pm UTC](https://discuss.elastic.co/t/devtools-only-showing-10-000-hits/250663/4 "2020-10-30T19:25:32Z")

</div>

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