Distributed edit The index operation is directed to the primary shard based on its route (see the Routing section above) and performed on the actual node containing this shard. After the primary shard completes the operation, if needed, the update is distributed to applicable replicas. Write Consistency edit To prevent writes from taking place on the "wrong" side of a network partition, by default, index operations only succeed if a quorum (>replicas/2+1) of active shards are available. This default can be overridden on a node-by-node basis using the action.write_consistency setting. To alter this behavior per-operation, the consistency request parameter can be used. Valid write consistency values are one, quorum, and all. Note, for the case where the number of replicas is 1 (total of 2 copies of the data), then the default behavior is to succeed if 1 copy (the primary) can perform the write. The index operation only returns after all active shards within the replication group have indexed the document (sync replication).
replication The default value for replication issync.This causes the primary shard to wait for successful responses from the replica shards before returning. If you set replication to async, it will return success to the client as soon as the request has been executed on the primary shard. It will still forward the request to the replicas, but you will not know whether the replicas succeeded. This option is mentioned specifically to advise against using it. The defaultsync replication allows Elasticsearch to exert back pressure on whatever system is feeding it with data. Withasync replication, it is possible to overload Elasticsearch by sending too many requests without waiting for their completion. 复制 复制的缺省值是sync。在这种设定下,原始切片返回前,需要等待副本先返回。 如果把replication设置为async,请求在原始切片上的执行成功后会立即返回成功给客户端。这种设定下,请求仍然会转发给副本,但是客户端不知道副本上是否成功。 此选项特别建议,不要使用它。缺省的同步复制选项可以使Elasticsearch把压力反馈给客户端程序。异步复制的话,有可能使Elasticsearch过载。 consistency By default, the primary shard requires aquorum, or majority, of shard copies (where a shard copy can be a primary or a replica shard) to be available before even attempting a write operation. This is to prevent writing data to the “wrong side” of a network partition. A quorum is defined as follows: int( (primary + number_of_replicas) / 2 ) + 1 The allowed values for consistency areone (just the primary shard),all (the primary and all replicas), or the default quorum, or majority, of shard copies. Note that the number_of_replicas is the number of replicasspecified in the index settings, not the number of replicas that are currently active. If you have specified that an index should have three replicas, a quorum would be as follows: int( (primary + 3 replicas) / 2 ) + 1 = 3 But if you start only two nodes, there will be insufficient active shard copies to satisfy the quorum, and you will be unable to index or delete any documents. 一致性 缺省的,即使尝试一个写操作,原始切片也需要“法定人数”的拷贝就绪。这是为了防止把数据写到“错误的网络区域”。
http://blog.csdn.net/silent1/article/details/44590657
https://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-index_.html
相关推荐
简单配置后将oracle数据同步到elasticsearch数据库中
springboot整合elasticsearch7,进行数据同步。elasticsearch相关度查询、排序。高亮显示;自动补全等功能。代码仅供参考,代码中有具体的注释,可以根据代码及注释内容,对自己项目架构及业务进行修改、整合。
go-mysql-elasticsearch - 自动同步你的MySQL数据到Elasticsearch
elasticsearch-2.3.2.tar.gz和elasticsearch-jdbc-2.3.2.0-dist.zip,可以进行mysql数据库数据同步到es中,亲测有效。详见博客http://www.cnblogs.com/zhongshengzhen/
(狂神)ElasticSearch快速入门笔记,ElasticSearch基本操作以及爬虫(Java-ES仿京东实战),包含了小狂神讲的东西,特别适合新手学习,笔记保存下来可以多看看。好记性不如烂笔头哦~,ElasticSearch,简称es,es是一个...
同步MongoDB数据到ElasticSearch,支持全量同步、增量同步、实时同步,支持全操作,支持中间数据处理
elasticsearch elasticsearch-6.2.2 elasticsearch-6.2.2.zip 下载
同步mysql数据到elasticsearch的工具,功能丰富,用法简单,配置灵活,扩展性强;
一般来说我们开发Elasticsearch会选择使用集成springboot,在网上找的springboot集成elasticsearch文章几乎都是extends ElasticsearchRepository的方式来实现。但是新版本ElasticsearchRepository里的方法基本上已经...
无论您拥有结构化或非结构化文本、数字数据还是地理空间数据,Elasticsearch 都能以支持快速搜索的方式高效地存储和索引它。您可以超越简单的数据检索和聚合信息来发现数据中的趋势和模式。随着您的数据和查询量的...
canal实现mysql到ES数据实时同步
消费kafka数据,然后批量导入到Elasticsearch,本例子使用的kafka版本0.10,es版本是6.4,使用bulk方式批量导入到es中,也可以一条一条的导入,不过比较慢。 <groupId>org.elasticsearch <artifactId>elastic...
elasticsearch-8.2.3 windows 版本。 Elasticsearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。Elasticsearch是用Java语言开发的,并作为Apache许可条款下的...
logstash同步elasticsearch笔记 2018,包括配置文件,和demo
简易博客检索系统使用前后端分离,前端使用 Vue ,后端使用 SpringBoot 数据库 MySQL 检索使用 ElasticSearch 同步数据使用 logstash 基于Springboot + ElasticSearch +Vue+MySQL构建的博客检索系统 项目经过严格...
docker run --name elasticsearch7.16.3 -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" -v /Users/xingyue/Home/xingyue/学习/工程化/es/elasticsearch.yml:/usr/share/elastic...
使用Hbase协作器(Coprocessor)同步数据到ElasticSearch(hbase 版本 1.2.0-cdh5.8.0, es 2.4.0 版本)源代码
一个将MySQL的数据同步到ElasticSearch的工具。首次初始导入基于mysqldump,增量同步基于MySQL的binlog机制,采用Python语言开发。 标签:数据同步
赠送jar包:elasticsearch-6.8.3.jar; 赠送原API文档:elasticsearch-6.8.3-javadoc.jar; 赠送源代码:elasticsearch-6.8.3-sources.jar; 赠送Maven依赖信息文件:elasticsearch-6.8.3.pom; 包含翻译后的API文档...