弹性搜索中的全尺寸索引

时间:2016-03-05 21:31:40

标签: elasticsearch

有没有办法以编程方式知道索引的大小。现在我正在尝试URL“https://developers.google.com/fusiontables/docs/articles/fusiontables_styling#styling-via-the-google-maps-api

给出大小一位小数(例如,对于2.60和2.66,它给出2.6)。我希望大小小到两位小数。请提出一些观点。

1 个答案:

答案 0 :(得分:3)

实现所需内容的一种简单方法是询问size in bytes,因此您具有完全的精确度,只需在网址末尾添加...&bytes=b,如下所示:

curl 'http://localhost:9200/_cat/indices?h=index,store.size&bytes=b'

你会收到这样的回复:

index1       37224042277 
index2        5864821948 
index3        6964380398 
相关问题