ElasticSearch: Atomic bulk update

爷,独闯天下 提交于 2021-01-28 10:59:54

问题


Is it possible to do bulk atomic updates in ElasticSearch?

I am aware that regular bulk updates are not atomic as noted here: https://www.elastic.co/guide/en/elasticsearch/guide/current/bulk.html#bulk

Is there any other way to atomically update multiple documents? i.e. Either all the updates happen or none of them do.


回答1:


Elasticsearch doesn't currently have a way to do what you're asking for. There are several responses to this question on the Elasticsearch site.

https://discuss.elastic.co/t/is-es-support-transaction-such-as-rollback/12579

https://discuss.elastic.co/t/rollback-es-6/85958

https://github.com/elastic/elasticsearch/issues/15316

Currently you would need to architect a solution yourself. There is an interesting blog about a potential solution here: https://blog.codecentric.de/en/2014/10/transactions-elasticsearch/



来源:https://stackoverflow.com/questions/52539822/elasticsearch-atomic-bulk-update

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!