# Regarding upsert query

**URL:** <https://discuss.elastic.co/t/regarding-upsert-query/82576>\
**Category:** Elasticsearch\
**Created:** [April 17, 2017, 12:52pm UTC](https://discuss.elastic.co/t/regarding-upsert-query/82576 "2017-04-17T12:52:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aayush\_Anand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aayush_anand/32/17415_2.png) [@Aayush\_Anand](https://discuss.elastic.co/u/Aayush_Anand)\
**Post date:** [April 17, 2017, 12:52pm UTC](https://discuss.elastic.co/t/regarding-upsert-query/82576/1 "2017-04-17T12:52:22Z")

</div>

I need some help in upsert query. I have to append new values to arrays of  
already existing key. I know how to do this part.  
But problem is -

1. Values in the array must be unique. So new value will be appended only  
if that value was not present in the array earlier.
2. Also, I need way to delete specific value of the array. Plz help in this.

---

<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 15, 2017, 1:02pm UTC](https://discuss.elastic.co/t/regarding-upsert-query/82576/2 "2017-05-15T13:02:07Z")

</div>

Closed on May 15, 2017, 1:02pm UTC

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