# Having huge index without data?

**URL:** <https://forum.opensearch.org/t/having-huge-index-without-data/20278>\
**Category:** OpenSearch\
**Tags:** troubleshoot, cve, security-issue\
**Created:** [July 13, 2024, 5:20pm UTC](https://forum.opensearch.org/t/having-huge-index-without-data/20278 "2024-07-13T17:20:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugne](https://avatars.discourse-cdn.com/v4/letter/h/c68b51/32.png) [@hugne](https://forum.opensearch.org/u/hugne)\
**Post date:** [July 13, 2024, 5:20pm UTC](https://forum.opensearch.org/t/having-huge-index-without-data/20278/1 "2024-07-13T17:20:11Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
2.8  
build date 2023-06-03

**Describe the issue** :  
The size of the index is 50GB. The query reports to have 62642231 documents but I can’t see them in the OpensearchDashboard. Only a few (normal) documents are displayed there.

Also strange, that I use one index per day. The index for July 12 queried in the screenshot shows data from July 2nd.

How can i find these “occupying” documents and how to be sure, that it is not some kind of CVE like this [I Geeting some vulnerability issue in opensearchproject/opensearch-Dashboard:2.8.0 docker Image](https://forum.opensearch.org/t/i-geeting-some-vulnerability-issue-in-opensearchproject-opensearch-dashboard-2-8-0-docker-image/14734)

**Configuration** :

**Relevant Logs or Screenshots** :

 ![Screenshot 2024-07-13 191740](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/6/6073a2c90259b3c27ce191b9a2df3113c64c2cae.png)

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [July 15, 2024, 8:47am UTC](https://forum.opensearch.org/t/having-huge-index-without-data/20278/2 "2024-07-15T08:47:26Z")

</div>

You can check the document count by calling

```auto
GET fluent-bit-sec-2024.07.12/_count

```

.  
You can also execute aggregation on the `_index` field to check if there’re some old documents existing in the new index:

```auto
GET fluent-bit-sec-2024.07.12/_search
{
  "size": 0,
  "aggs": {
    "test": {
      "terms": {
        "field": "_index"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![hugne](https://avatars.discourse-cdn.com/v4/letter/h/c68b51/32.png) [@hugne](https://forum.opensearch.org/u/hugne)\
**Post date:** [July 17, 2024, 6:07pm UTC](https://forum.opensearch.org/t/having-huge-index-without-data/20278/3 "2024-07-17T18:07:46Z")

</div>

> [@gaobinlong](#):
>
> `GET fluent-bit-sec-2024.07.12/_count`

Thank you very much!

The first command

```auto
GET fluent-bit-sec-2024.07.17/_count

```

returned:

```auto
{
  "count": 28763834,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  }
}

```

Looks fine with a lot of entries.

But if I search the data using the DQL search, I get NO results. 😢

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/c/c6f6b5fddcd29151880eff6eba8a5af6ebdcda39.png)

The second command returned:

```auto
{
  "took": 1699,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 10000,
      "relation": "gte"
    },
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "test": {
      "doc_count_error_upper_bound": 0,
      "sum_other_doc_count": 0,
      "buckets": [
        {
          "key": "fluent-bit-sec-2024.07.17",
          "doc_count": 21963753
        }
      ]
    }
  }
}

```

Do you havy another idea what else I could check?

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [July 18, 2024, 2:35am UTC](https://forum.opensearch.org/t/having-huge-index-without-data/20278/4 "2024-07-18T02:35:04Z")

</div>

Maybe it’s caused by the timezone issue, you can expand the time range to check if any results could be returned or check the query DSL in the browser’s console:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/2/2d53a0594c8cca19e7b44084fc1c1c19f925b547.png)

---

<div class="post-metadata">

**Author:** ![KateWinslet](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/katewinslet/32/6694_2.png) [@KateWinslet](https://forum.opensearch.org/u/KateWinslet)\
**Post date:** [July 25, 2024, 11:19am UTC](https://forum.opensearch.org/t/having-huge-index-without-data/20278/5 "2024-07-25T11:19:03Z")

</div>

> [@hugne](#):
>
> **Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
> 2.8  
> build date 2023-06-03
> 
> **Describe the issue** :  
> The size of the index is 50GB. The query reports to have 62642231 documents but I can’t see them in the OpensearchDashboard. Only a few (normal) documents are displayed there.
> 
> Also strange, that I use one index per day. The index for July 12 queried in the screenshot shows data from July 2nd.
> 
> How can i find these “occupying” documents and how to be sure, that it is not some kind of CVE like this [I Geeting some vulnerability issue in opensearchproject/opensearch-Dashboard:2.8.0 docker Image](https://forum.opensearch.org/t/i-geeting-some-vulnerability-issue-in-opensearchproject-opensearch-dashboard-2-8-0-docker-image/14734)
> 
> **Configuration** :
> 
> **Relevant Logs or Screenshots** :
> 
> ![Screenshot 2024-07-13 191740](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/6/6073a2c90259b3c27ce191b9a2df3113c64c2cae.png)  
> [Locksmith Sherman Oaks](https://www.google.com/maps?cid=7962055348330626407)

Check for hidden or corrupt documents causing discrepancies in the OpenSearch Dashboard. Ensure index settings and mappings are correct and consistent. Review logs and security settings for potential vulnerabilities or errors in the 2.8.0 Docker image, and investigate any unusual patterns or entries.

---

<div class="post-metadata">

**Author:** ![hugne](https://avatars.discourse-cdn.com/v4/letter/h/c68b51/32.png) [@hugne](https://forum.opensearch.org/u/hugne)\
**Post date:** [July 28, 2024, 9:13pm UTC](https://forum.opensearch.org/t/having-huge-index-without-data/20278/6 "2024-07-28T21:13:57Z")

</div>

Thank you very much. Your suggestions sound promising.  
Could you give me a hint on how to achieve these?

- Ensure index settings and mappings are correct and consistent
- potential vulnerabilities or errors in the 2.8.0 Docker image
- investigate any unusual patterns or entries with Millions of documents?
