# Delete / Update Document impact in document frequency

**URL:** <https://discuss.elastic.co/t/delete-update-document-impact-in-document-frequency/109458>\
**Category:** Elasticsearch\
**Created:** [November 28, 2017, 7:21pm UTC](https://discuss.elastic.co/t/delete-update-document-impact-in-document-frequency/109458 "2017-11-28T19:21:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkrombho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkrombho/32/3574_2.png) [@rkrombho](https://discuss.elastic.co/u/rkrombho)\
**Post date:** [November 28, 2017, 7:21pm UTC](https://discuss.elastic.co/t/delete-update-document-impact-in-document-frequency/109458/1 "2017-11-28T19:21:57Z")

</div>

Hi,

it looks like updating a document (which just marks the old one as deleted) does not remove term statictics from the old version of the document.  
The old/deleted Document still seem to be included in the document frequency statistics.

Is this expected behaviour?  
Will the statistics update after the next segment merge happened and the tombstoned document is physically removed?

I came across this wile using the `more_like_this` query with a `max_doc_freq` limit and a frequently updated document as the `like` input.

Cheers  
Robert

---

<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:** [December 26, 2017, 7:22pm UTC](https://discuss.elastic.co/t/delete-update-document-impact-in-document-frequency/109458/2 "2017-12-26T19:22:05Z")

</div>

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