獲取當前的全部配置node
curl -XPUT 'http://localhost:9200/_all/_settings'curl
{"debitlist":{"settings":{"index":{"creation_date":"1485160809262","number_of_shards":"1","number_of_replicas":"0","version":{"created":"1060299"},"uuid":"f5_trQOERqWoHTDqdbMTxw"}}}elasticsearch
會返回全部的索引,建立日期、主分片數量、從分片數量等信息ide
獲取文檔數量ui
curl -XPUT 'http://localhost:9200/_count?pretty'url
_count?pretty 能夠簡寫爲_countspa
查看 cluster healthorm
_cluster/health索引
curl -XPUT 'http://localhost:9200/_count/health'ci
官方關於elasticsearch 配置的說明
# These settings directly affect the performance of index and search operations
# in your cluster. Assuming you have enough machines to hold shards and
# replicas, the rule of thumb is:
#
# 1. Having more *shards* enhances the _indexing_ performance and allows to
# _distribute_ a big index across machines.
# 2. Having more *replicas* enhances the _search_ performance and improves the
# cluster _availability_.
#
# The "number_of_shards" is a one-time setting for an index.
#
# The "number_of_replicas" can be increased or decreased anytime,
# by using the Index Update Settings API.
#
# Elasticsearch takes care about load balancing, relocating, gathering the
# results from nodes, etc. Experiment with different settings to fine-tune
# your setup.
# Use the Index Status API (<http://localhost:9200/A/_status>) to inspect
# the index status.