# GET returns only 10000 documents

**URL:** <https://discuss.elastic.co/t/get-returns-only-10000-documents/220377>\
**Category:** Elasticsearch\
**Created:** [February 21, 2020, 1:38pm UTC](https://discuss.elastic.co/t/get-returns-only-10000-documents/220377 "2020-02-21T13:38:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Norman\_Khine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/norman_khine/32/3342_2.png) [@Norman\_Khine](https://discuss.elastic.co/u/Norman_Khine)\
**Post date:** [February 21, 2020, 1:38pm UTC](https://discuss.elastic.co/t/get-returns-only-10000-documents/220377/1 "2020-02-21T13:38:09Z")

</div>

hello,  
i have the following:

```
GET /analytics-staging-2019.02.*/_search
{
  "size": 0
}

```

i have specified `size` but this is still returning only:

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

```

i want to get a total number of documents.

any advice is much appreciated

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 21, 2020, 1:55pm UTC](https://discuss.elastic.co/t/get-returns-only-10000-documents/220377/2 "2020-02-21T13:55:58Z")

</div>

run:

```
GET /analytics-staging-2019.02.*/_search?track_total_hits=true
{
  "size": 0
}
```

---

<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 20, 2020, 1:56pm UTC](https://discuss.elastic.co/t/get-returns-only-10000-documents/220377/3 "2020-03-20T13:56:10Z")

</div>

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