# How to add multiple tags using script

**URL:** <https://discuss.elastic.co/t/how-to-add-multiple-tags-using-script/119411>\
**Category:** Elasticsearch\
**Created:** [February 12, 2018, 4:18am UTC](https://discuss.elastic.co/t/how-to-add-multiple-tags-using-script/119411 "2018-02-12T04:18:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ESCoder](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@ESCoder](https://discuss.elastic.co/u/ESCoder)\
**Post date:** [February 12, 2018, 4:18am UTC](https://discuss.elastic.co/t/how-to-add-multiple-tags-using-script/119411/1 "2018-02-12T04:18:23Z")

</div>

Hi,

I have document with "tags" as one property which has list of values. For example

"tags": ["red", "blue", "green"]

I want to add ["yellow", "black"] and remove ["blue"] tags in one update call in NEST.

And how do I ensure all tags in that list are unique.

Note: I'm using ElasticSearch 6.x

Thanks

---

<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:** [March 12, 2018, 4:19am UTC](https://discuss.elastic.co/t/how-to-add-multiple-tags-using-script/119411/2 "2018-03-12T04:19:07Z")

</div>

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