# The Best Practice to Updates Lot of Documents

**URL:** <https://discuss.elastic.co/t/the-best-practice-to-updates-lot-of-documents/72143>\
**Category:** Elasticsearch\
**Created:** [January 19, 2017, 10:03am UTC](https://discuss.elastic.co/t/the-best-practice-to-updates-lot-of-documents/72143 "2017-01-19T10:03:55Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)\
**Post date:** [January 23, 2017, 9:11am UTC](https://discuss.elastic.co/t/the-best-practice-to-updates-lot-of-documents/72143/4 "2017-01-23T09:11:36Z")

</div>

Hi,

My script add or remove Long value from an array field, you can find it here:

> [@Script having issue with long data type](https://discuss.elastic.co/t/script-having-issue-with-long-data-type/68795):
>
> Hello, I'm kind of new to elasticsearch. I had a question regarding using transport client ( v5.0.1 and my elasticsearch cluster is also at 5.0.1). I'm seeing this error when I try to call update operation. My document is of following format: { x: [\_array\_of\_longs] } I tried to use script to have an append only if it exists in the array kind of operation. I don't know if elasticsearch supports Set data structure. Whenever i try with small integer like 100, 200 it works. But when I enter l…

bye,  
Xavier

---

_[View the full topic](https://discuss.elastic.co/t/the-best-practice-to-updates-lot-of-documents/72143)._
