# Updating records and indices

**URL:** https://discuss.elastic.co/t/updating-records-and-indices/200450
**Category:** Elasticsearch
**Created:** [September 20, 2019, 3:16pm UTC](https://discuss.elastic.co/t/updating-records-and-indices/200450 "2019-09-20T15:16:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![edster](https://avatars.discourse-cdn.com/v4/letter/e/da6949/32.png) [@edster](https://discuss.elastic.co/u/edster)
#### Post date: [September 20, 2019, 3:16pm UTC](https://discuss.elastic.co/t/updating-records-and-indices/200450/1 "2019-09-20T15:16:39Z")

</div>

Is there a way to update records in indices if they don't exist. Currently I've seen that values changed within an index get updated, however, if a record doesn't exist in a file, for example, the record is not removed. How can I update elastic or the logstash config files to update records if they no longer exist. (Both for files and for database ingestions.)

How about for an entire index. What if I need to remove the entire index every time because we don't have a unique document id but we need all the records. In other words we don't want the records to accumulate because we don't have a document id. We would just like to have the ones either currently used in the files or queries given in the logstash files.

---

<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: [October 18, 2019, 3:16pm UTC](https://discuss.elastic.co/t/updating-records-and-indices/200450/2 "2019-10-18T15:16:40Z")

</div>

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