# How to create my own document\_id in logstash?

**URL:** <https://discuss.elastic.co/t/how-to-create-my-own-document-id-in-logstash/1416>\
**Category:** Logstash\
**Created:** [May 27, 2015, 6:42pm UTC](https://discuss.elastic.co/t/how-to-create-my-own-document-id-in-logstash/1416 "2015-05-27T18:42:30Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![elastic\_paul](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@elastic\_paul](https://discuss.elastic.co/u/elastic_paul)\
**Post date:** [May 29, 2015, 10:56am UTC](https://discuss.elastic.co/t/how-to-create-my-own-document-id-in-logstash/1416/9 "2015-05-29T10:56:18Z")

</div>

Perfect thanks.

I also had to edit the elasticsearch plugin to accept an HTTP code 409 when using the create command. See my other thread for that one.

> [@Re: "create action does not use \_id for request #79"](https://discuss.elastic.co/t/re-create-action-does-not-use--id-for-request-79/1501):
>
> create action does not use \_id for request #79 hxxps://github.com/logstash-plugins/logstash-output-elasticsearch/issues/79 This means that I can not use my own deduplication where I manually set the document\_id to a given hash. My document\_id will not be the same as the \_id that is being used and so it won't work with action=\>create Have I got that right? EDIT: NO! I did not get this right. It failed because ES returns an HTTP code 409 for the duplicate (correctly) but the plugin fails on th…

---

_[View the full topic](https://discuss.elastic.co/t/how-to-create-my-own-document-id-in-logstash/1416)._
