# Docs.deleted value not changing

**URL:** <https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023>\
**Category:** Elasticsearch\
**Created:** [January 13, 2021, 4:32pm UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023 "2021-01-13T16:32:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![munasia](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@munasia](https://discuss.elastic.co/u/munasia)\
**Post date:** [January 13, 2021, 4:32pm UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/1 "2021-01-13T16:32:16Z")

</div>

I have a non-prod cluster that I use to run tests. I took a snapshot of my prod cluster data and restored it into this non-prod cluster which created the two indices that I have in production. However when I `GET _cat/indices?v` on this test cluster the `docs.deleted` value (which is non-zero for both indices) for those two indices hasn't changed ever. Any idea why this is happening? These indices have not been used since they were created, so could this lack of activity on the indices be the reason?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 13, 2021, 10:05pm UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/2 "2021-01-13T22:05:48Z")

</div>

Are you deleting docs?

---

<div class="post-metadata">

**Author:** ![munasia](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@munasia](https://discuss.elastic.co/u/munasia)\
**Post date:** [January 14, 2021, 12:48am UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/3 "2021-01-14T00:48:24Z")

</div>

No I'm not deleting docs. I'm not even using the indices yet, I just set them up two days ago and noticed today that the `docs.deleted` value has not changed for either index.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 14, 2021, 1:16am UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/4 "2021-01-14T01:16:09Z")

</div>

Then I wouldn't worry too much.

Deletes can happen due to updates as well. But if you're not doing either it's not a concern.

---

<div class="post-metadata">

**Author:** ![munasia](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@munasia](https://discuss.elastic.co/u/munasia)\
**Post date:** [January 14, 2021, 1:34am UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/5 "2021-01-14T01:34:24Z")

</div>

Thanks for your reply. I'm trying to understand how `docs.deleted` works. Is that value staying the same because the indices are idle(i.e I'm not using them yet)? According to [this](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/merge-process.html#merge-process), `There is nothing you need to do to enable merging. It happens automatically while you are indexing and searching`. So since my indices are idle, automatic merges are not happening?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 14, 2021, 1:46am UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/6 "2021-01-14T01:46:16Z")

</div>

It'll change when documents are updated or deleted. You can still read from or write to an index and that number will not change. It doesn't mean the index is idle.

---

<div class="post-metadata">

**Author:** ![munasia](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@munasia](https://discuss.elastic.co/u/munasia)\
**Post date:** [January 14, 2021, 2:01am UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/7 "2021-01-14T02:01:38Z")

</div>

By "idle" I meant that I'm not using those indices yet. I'm still writing the client code that will interact with them.

> You can still read from or write to an index and that number will not change.

I see. I was expecting `docs.deleted` to decrement. I thought merging would've been happening since the creation of the indices.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 14, 2021, 2:17am UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/8 "2021-01-14T02:17:38Z")

</div>

Can you share the output from the cat call?

---

<div class="post-metadata">

**Author:** ![munasia](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@munasia](https://discuss.elastic.co/u/munasia)\
**Post date:** [January 14, 2021, 2:52am UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/9 "2021-01-14T02:52:39Z")

</div>

```
pri rep status docs.deleted health docs.count store.size pri.store.size
  5 1 open 2156999 green 7573689 53.9gb 26.9gb
  5 1 open 55625 green 158265 7.5gb 3.7gb
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 17, 2021, 10:56pm UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/10 "2021-01-17T22:56:48Z")

</div>

You can try a force merge and see if that changes it?

---

<div class="post-metadata">

**Author:** ![munasia](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@munasia](https://discuss.elastic.co/u/munasia)\
**Post date:** [January 21, 2021, 3:19pm UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/11 "2021-01-21T15:19:13Z")

</div>

Yes, force merge changed the `doc.count`s to zero, but I'm still confused as to why they never changed prior to the merge.

---

<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:** [February 18, 2021, 3:19pm UTC](https://discuss.elastic.co/t/docs-deleted-value-not-changing/261023/12 "2021-02-18T15:19:15Z")

</div>

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