我们从上面可以看出来:一个 cluster 由一个或多个 nodes 组成。在每个 node 里,它包含一个或更多的 shards。这些 shards 可以是primary shard(主分片),也可以是 replica shard(副本分片)。每个 shard 里含有一个 index 的全部或部分数据。一个 index 由一个或多个 shard 组成。每个 index 包含无数的 documents。
Elasticsearch是一个分布式搜索和分析引擎,可以处理大量数据。它是用Java编写的,基于Apache Lucene搜索库。
(1) 这个在高版本中已经废弃,如果要继续使用请将spring-boot.version改为2.1.3.RELEASE时,这两个结点有效,没有过时。 (2) 这个在高版本中已经废弃,官方建议我们使用:High Level REST Client @Configuration public class
node.name: vagrant #node.attr.rack: r1 #path.data:/path/to/data #path.logs:/path/to/logs #bootstrap.memory_lock:truenetwork.host:0.0.0.0http.port:9200#discovery.seed_hosts: ["host1","host2"] cluster.initial_master_nodes: ["vagrant"] #action.destructive_requires_name:falsexpack.securit...
gateway.expected_nodes:2 设置这个集群中节点的数量,默认为2,一旦这N个节点启动,就会立即进行数据恢复。 cluster.routing.allocation.node_initial_primaries_recoveries:4 初始化数据恢复时,并发恢复线程的个数,默认为4。 cluster.routing.allocation.node_concurrent_recoveries:2 ...
cluster.initial_master_nodes:仅在集群首次启动会使用。 discovery.seed_hosts:每次启动都需要。 2.7 Discovery 过程解读 Discovery 过程从一个或多个种子主机列表以及集群中已知的任何一个候选主节点地址开始。 该过程分两个阶段进行: 首先,探测种子地址。
cluster.name:es-cluster node.name:es-node-1 discovery.zen.ping.unicast.hosts:["192.168.1.101","192.168.1.102"] discovery.zen.minimum_master_nodes:1 本文的演示环境为 Ubuntu Server 18.04,Elasticsearch 的版本为 6.2.4。 配置文件 在Ubuntu 中使用 deb 包安装的 Elasticsearch 的默认安装目录为: ...
{"cluster_name":"hongcaixia","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":2,"active_shards":2,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"...
cluster.name:"BoCloud_cluster"node.name:condition_1 node.data:falsenode.master:falsenode.ingest:truehttp.port:9200transport.tcp.port:9300discovery.seed_hosts:["dc_es1","dc_es2","dc_es3"]cluster.initial_master_nodes:["dc_es1","dc_es2","dc_es3"] ...
cluster_name : 默认名为 elasticsearch version :版本信息 可以通过curl '127.0.0.1:9200/_cat/nodes/?v' ,可以看到当前节点的信息,如下: #健康检查 curl '127.0.0.1:9200/_cat/health?v' #查询es中所有索引,所有已存在的索引 curl '127.0.0.1:9200/_cat/indices?v' ...