ElasticSearch:原子批量更新 [英] ElasticSearch: Atomic bulk update
问题描述
是否可以在ElasticSearch中进行批量原子更新?
Is it possible to do bulk atomic updates in ElasticSearch?
我知道,定期批量更新并非如此处所述是原子的: https://www.elastic.co/guide/zh/elasticsearch/guide/current/bulk.html#bulk
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.
推荐答案
Elasticsearch目前尚无法满足您的要求.在Elasticsearch网站上有对该问题的几种答复.
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-as-rollback/12579
https://discuss.elastic.co/t/rollback-es-6/85958
https://github.com/elastic/elasticsearch/issues/15316
当前,您需要自行设计解决方案.这里有一个有关潜在解决方案的有趣博客: https://blog.codecentric.de/zh/2014/10/transactions-elasticsearch/
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/
这篇关于ElasticSearch:原子批量更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!