# Getting updated documents

**URL:** <https://discuss.elastic.co/t/getting-updated-documents/329910>\
**Category:** Elasticsearch\
**Created:** [April 13, 2023, 9:01am UTC](https://discuss.elastic.co/t/getting-updated-documents/329910 "2023-04-13T09:01:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ismet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ismet/32/103499_2.png) [@Ismet](https://discuss.elastic.co/u/Ismet)\
**Post date:** [April 13, 2023, 9:01am UTC](https://discuss.elastic.co/t/getting-updated-documents/329910/1 "2023-04-13T09:01:54Z")

</div>

How to get all documents that have been edited in the last 24 hours and return only the id and attributes that have been changed? Is it possible to do this automatically via Elasticsearch without tracking each attribute? If we can't work through Elasticsearch any advice on how this could be done? Use the latest Elasticsearch version 8.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 13, 2023, 9:18am UTC](https://discuss.elastic.co/t/getting-updated-documents/329910/2 "2023-04-13T09:18:39Z")

</div>

> [@Ismet](#):
>
> Is it possible to do this automatically via Elasticsearch without tracking each attribute?

As far as I know this is not possible.

---

<div class="post-metadata">

**Author:** ![Ismet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ismet/32/103499_2.png) [@Ismet](https://discuss.elastic.co/u/Ismet)\
**Post date:** [April 13, 2023, 9:59am UTC](https://discuss.elastic.co/t/getting-updated-documents/329910/3 "2023-04-13T09:59:33Z")

</div>

Thanks, any advice on how this could be done? For now, I go with filed updated with unix time, and in every attribute which, I track also put filed updated.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 13, 2023, 10:58am UTC](https://discuss.elastic.co/t/getting-updated-documents/329910/4 "2023-04-13T10:58:47Z")

</div>

I do not really have any suggestions. Do not think there is any simple elegant way of doing this so you may need to track this through fields in your document.

---

<div class="post-metadata">

**Author:** ![Ismet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ismet/32/103499_2.png) [@Ismet](https://discuss.elastic.co/u/Ismet)\
**Post date:** [April 13, 2023, 3:20pm UTC](https://discuss.elastic.co/t/getting-updated-documents/329910/5 "2023-04-13T15:20:16Z")

</div>

How to track if some doc is deleted or some attribute is deleted?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 13, 2023, 3:21pm UTC](https://discuss.elastic.co/t/getting-updated-documents/329910/6 "2023-04-13T15:21:11Z")

</div>

There is nothing built in so you will need to handle it with custom logic.

---

<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:** [May 11, 2023, 3:22pm UTC](https://discuss.elastic.co/t/getting-updated-documents/329910/7 "2023-05-11T15:22:11Z")

</div>

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