# ES5.2 - what is the fastest way to find if \_id already exist?

**URL:** <https://discuss.elastic.co/t/es5-2-what-is-the-fastest-way-to-find-if--id-already-exist/81500>\
**Category:** Elasticsearch\
**Created:** [April 6, 2017, 4:10pm UTC](https://discuss.elastic.co/t/es5-2-what-is-the-fastest-way-to-find-if--id-already-exist/81500 "2017-04-06T16:10:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![idanhagai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/idanhagai/32/16175_2.png) [@idanhagai](https://discuss.elastic.co/u/idanhagai)\
**Post date:** [April 6, 2017, 4:10pm UTC](https://discuss.elastic.co/t/es5-2-what-is-the-fastest-way-to-find-if--id-already-exist/81500/1 "2017-04-06T16:10:26Z")

</div>

I have 30 days time based indices.

---

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [April 6, 2017, 5:32pm UTC](https://discuss.elastic.co/t/es5-2-what-is-the-fastest-way-to-find-if--id-already-exist/81500/2 "2017-04-06T17:32:16Z")

</div>

Depend how your ID are generated and what do you mean by speed (sub-second, sub-milli ?)

The fastest way should be to use memcache or Redis (MEMORY STORE) ^^ where elasticsearch is not ...

Is GET /INDEX/ID endpoint not fast enough ?

---

<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 4, 2017, 5:32pm UTC](https://discuss.elastic.co/t/es5-2-what-is-the-fastest-way-to-find-if--id-already-exist/81500/3 "2017-05-04T17:32:27Z")

</div>

Closed on May 4, 2017, 5:32pm UTC

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