# Difference between index and update with doc\_as\_upsert

**URL:** <https://discuss.elastic.co/t/difference-between-index-and-update-with-doc-as-upsert/183345>\
**Category:** Elasticsearch\
**Created:** [May 29, 2019, 1:49pm UTC](https://discuss.elastic.co/t/difference-between-index-and-update-with-doc-as-upsert/183345 "2019-05-29T13:49:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elastic\_26](https://avatars.discourse-cdn.com/v4/letter/e/ecc23a/32.png) [@elastic\_26](https://discuss.elastic.co/u/elastic_26)\
**Post date:** [May 29, 2019, 1:49pm UTC](https://discuss.elastic.co/t/difference-between-index-and-update-with-doc-as-upsert/183345/1 "2019-05-29T13:49:28Z")

</div>

Hello,  
I am trying to find out what is the difference between using "index" versus using "update with doc\_as\_upsert set to true".  
Which one is better from a performance perspective?  
Thank you

---

<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:** [June 26, 2019, 1:49pm UTC](https://discuss.elastic.co/t/difference-between-index-and-update-with-doc-as-upsert/183345/2 "2019-06-26T13:49:31Z")

</div>

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