首页 > Windows开发 > 详细

elasticsearch API列表

时间:2017-02-06 18:23:36      阅读:379      评论:0      收藏:0      [点我收藏+]

获取当前的所有配置

curl -XPUT ‘http://localhost:9200/_all/_settings‘

{"debitlist":{"settings":{"index":{"creation_date":"1485160809262","number_of_shards":"1","number_of_replicas":"0","version":{"created":"1060299"},"uuid":"f5_trQOERqWoHTDqdbMTxw"}}}

会返回所有的索引,创建日期、主分片数量、从分片数量等信息

获取文档数量

curl -XPUT ‘http://localhost:9200/_count?pretty‘

_count?pretty 可以简写为_count

技术分享

查看 cluster health

_cluster/health

curl -XPUT http://localhost:9200/_count/health‘

官方关于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.


本文出自 “波波” 博客,请务必保留此出处http://chyou.blog.51cto.com/5503396/1895264

elasticsearch API列表

原文:http://chyou.blog.51cto.com/5503396/1895264

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!