# How to update new record only

**URL:** <https://discuss.elastic.co/t/how-to-update-new-record-only/105359>\
**Category:** Logstash\
**Created:** [October 26, 2017, 7:39am UTC](https://discuss.elastic.co/t/how-to-update-new-record-only/105359 "2017-10-26T07:39:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shekhar\_Pandey](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shekhar\_Pandey](https://discuss.elastic.co/u/Shekhar_Pandey)\
**Post date:** [October 26, 2017, 7:39am UTC](https://discuss.elastic.co/t/how-to-update-new-record-only/105359/1 "2017-10-26T07:39:32Z")

</div>

I used logstash and try to update change data in mysql to elasticsearch.....but it reindex again the whole documents instead of chnage the version number...bcz when we update anything it should has to chnage ther version number....neither chnage the whole index...

my config file is given below: I kept document\_id ="%{filed\_name}"

but it reindex done not update version

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 26, 2017, 8:39am UTC](https://discuss.elastic.co/t/how-to-update-new-record-only/105359/2 "2017-10-26T08:39:02Z")

</div>

Can you give an example of what you're getting vs. what you expected to get?

---

<div class="post-metadata">

**Author:** ![Shekhar\_Pandey](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shekhar\_Pandey](https://discuss.elastic.co/u/Shekhar_Pandey)\
**Post date:** [October 26, 2017, 9:03am UTC](https://discuss.elastic.co/t/how-to-update-new-record-only/105359/3 "2017-10-26T09:03:48Z")

</div>

I want to send update record of mysql to elastic using logstash.....but when did...it is doing reindex....not updating....bcz version not changed of doc...

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 26, 2017, 10:07am UTC](https://discuss.elastic.co/t/how-to-update-new-record-only/105359/4 "2017-10-26T10:07:46Z")

</div>

Show an example **of a document** that didn't look like you expected it to, and what you expected it to look like.

---

<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:** [November 23, 2017, 10:08am UTC](https://discuss.elastic.co/t/how-to-update-new-record-only/105359/5 "2017-11-23T10:08:54Z")

</div>

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