# ElasticSearch \_bulk and \_update got bad performance

**URL:** <https://discuss.elastic.co/t/elasticsearch-bulk-and-update-got-bad-performance/288746>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [November 9, 2021, 11:05am UTC](https://discuss.elastic.co/t/elasticsearch-bulk-and-update-got-bad-performance/288746 "2021-11-09T11:05:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunter\_Tr\_n](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hunter_tr_n/32/96886_2.png) [@Hunter\_Tr\_n](https://discuss.elastic.co/u/Hunter_Tr_n)\
**Post date:** [November 9, 2021, 11:05am UTC](https://discuss.elastic.co/t/elasticsearch-bulk-and-update-got-bad-performance/288746/1 "2021-11-09T11:05:22Z")

</div>

I'm using `_bulk` request and updating documents by `doc`. However, some complex cases need to apply `script` for updating.

However, the performance in case `script` is very bad. It affects search side and index side latency.

Is there any bottleneck between update by script and update by doc?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 9, 2021, 11:41am UTC](https://discuss.elastic.co/t/elasticsearch-bulk-and-update-got-bad-performance/288746/2 "2021-11-09T11:41:04Z")

</div>

Which version of Elasticsearch are you using? What is the size and structure of your documents? Are you using nested mappings? If so, how many nested object does an average document have?

---

<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:** [December 7, 2021, 11:41am UTC](https://discuss.elastic.co/t/elasticsearch-bulk-and-update-got-bad-performance/288746/3 "2021-12-07T11:41:38Z")

</div>

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