# No document in index, but index stats reports numerous docs

**URL:** <https://discuss.elastic.co/t/no-document-in-index-but-index-stats-reports-numerous-docs/266708>\
**Category:** Elasticsearch\
**Created:** [March 9, 2021, 2:14pm UTC](https://discuss.elastic.co/t/no-document-in-index-but-index-stats-reports-numerous-docs/266708 "2021-03-09T14:14:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zarak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zarak/32/85246_2.png) [@zarak](https://discuss.elastic.co/u/zarak)\
**Post date:** [March 9, 2021, 2:14pm UTC](https://discuss.elastic.co/t/no-document-in-index-but-index-stats-reports-numerous-docs/266708/1 "2021-03-09T14:14:20Z")

</div>

Hi !

I have an index that reports me some documents in Kibana in Index management, as well as in its stats:

```auto
GET /v2-logs-000003/_stats
    {
      "_shards" : {
        "total" : 6,
        "successful" : 6,
        "failed" : 0
      },
      "_all" : {
        "primaries" : {
          "docs" : {
            "count" : 19430,
            "deleted" : 0
          },
          "store" : {
            "size_in_bytes" : 4533561,
            "reserved_in_bytes" : 0
          },
[truncated]

```

However, I can't find the documents in it:

```auto
GET /v2-logs-000003/_search
    {
      "query": {
        "match_all": {}
      }
    }

```

returns

```auto
    {
      "took" : 0,
      "timed_out" : false,
      "_shards" : {
        "total" : 0,
        "successful" : 0,
        "skipped" : 0,
        "failed" : 0
      },
      "hits" : {
        "total" : {
          "value" : 0,
          "relation" : "eq"
        },
        "max_score" : 0.0,
        "hits" : []
      }
    }

```

Am I missing something ?

Thanks for your help

---

<div class="post-metadata">

**Author:** ![Miguel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miguel1/32/82094_2.png) [@Miguel1](https://discuss.elastic.co/u/Miguel1)\
**Post date:** [March 9, 2021, 2:36pm UTC](https://discuss.elastic.co/t/no-document-in-index-but-index-stats-reports-numerous-docs/266708/2 "2021-03-09T14:36:02Z")

</div>

Maybe the index is not refreshed yet ( `https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html` ).

---

<div class="post-metadata">

**Author:** ![zarak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zarak/32/85246_2.png) [@zarak](https://discuss.elastic.co/u/zarak)\
**Post date:** [March 9, 2021, 2:56pm UTC](https://discuss.elastic.co/t/no-document-in-index-but-index-stats-reports-numerous-docs/266708/3 "2021-03-09T14:56:05Z")

</div>

I just tried refresh-ing it, but it didn't solve the issue. The index is frozen, if that changes anything

EDIT: ok so apparently if an index is frozen, it's not searchable anymore, not directly, and needs to be unfreeze. I wasn't aware of that

---

<div class="post-metadata">

**Author:** ![Miguel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miguel1/32/82094_2.png) [@Miguel1](https://discuss.elastic.co/u/Miguel1)\
**Post date:** [March 9, 2021, 2:58pm UTC](https://discuss.elastic.co/t/no-document-in-index-but-index-stats-reports-numerous-docs/266708/4 "2021-03-09T14:58:55Z")

</div>

You have to use ignore\_throttled=false, if you want to include frozen indices. It is intended to avoid querying any kind of index and getting slower responses.

```auto
GET /v2-logs-000003/_search?ignore_throttled=false
    {
      "query": {
        "match_all": {}
      }
    }

```

---

<div class="post-metadata">

**Author:** ![zarak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zarak/32/85246_2.png) [@zarak](https://discuss.elastic.co/u/zarak)\
**Post date:** [March 9, 2021, 3:13pm UTC](https://discuss.elastic.co/t/no-document-in-index-but-index-stats-reports-numerous-docs/266708/5 "2021-03-09T15:13:52Z")

</div>

Ok, thank you for your response !

---

<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:** [April 6, 2021, 3:14pm UTC](https://discuss.elastic.co/t/no-document-in-index-but-index-stats-reports-numerous-docs/266708/6 "2021-04-06T15:14:50Z")

</div>

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