简体   繁体   English

弹性搜索数据访问是同步还是异步?

[英]Is elastic search data access sync or async?

As i am new to elastic search.how will elasticsearch work in concurrency.How search work and write/update/delete work in one node.Every request is processed one by one or it wil work simutaneously. 由于我是弹性搜索的新手,弹性搜索将如何并发工作。搜索如何在一个节点上工作以及写入/更新/删除工作。每个请求都被一个接一个地处理,或者同时工作。

 will it support transaction ??

Thanks in advance..! 提前致谢..!

CRUD requests happen in parallel within a single shard (you can have multiple shards on a single node). CRUD请求在单个碎片中并行发生(您可以在单个节点上具有多个碎片)。 Transactions are not supported. 不支持交易。

A bulk request (multiple CRUD requests in a single request) and processed serially on a single shard, but you can have multiple bulk requests processed in parallel on a single shard. 批量请求(单个请求中有多个CRUD请求)并在单个分片上进行串行处理,但是您可以在单个分片上并行处理多个批量请求。 They don't support transactions either. 他们也不支持交易。 The success or failure of one request within a bulk request doesn't affect the others. 批量请求中一个请求的成功或失败不会影响其他请求。

To ensure that one update doesn't overwrite changes from another, Elasticsearch provides optimistic concurrency control: you specify the version number of the doc you want to update. 为了确保一个更新不会覆盖另一个更新,Elasticsearch提供了乐观的并发控制:您指定要更新的文档的version号。 If the current version is different, then the update will fail and you can take the appropriate action. 如果当前version不同,则更新将失败,您可以采取适当的措施。

See versioning and the retry_on_conflict parameter on the update API . 请参阅更新API上的版本控制retry_on_conflict参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM