作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想知道是否可以运行DSL查询来获取超过一定大小的碎片列表?
_cat / shards列出了所有它们,但是我们有成千上万个shard,甚至将它们全部导出到Excel,并且尝试按值进行筛选也很困难。
我们可以指定一个查询来提取大于30Gb的碎片吗?
最佳答案
您可以显示所有碎片并按大小对其进行排序。根据documentation:
Each of the commands accepts a query string parameter s which sorts the table by the columns specified as the parameter value. Columns are specified either by name or by alias, and are provided as a comma separated string. By default, sorting is done in ascending fashion. Appending :desc to a column will invert the ordering for that column. :asc is also accepted but exhibits the same behavior as the default sort order.
GET _cat/shards?v&s=store:desc
v
用于
verbose command。
s
用于
sort query string。
store
是包含分片大小的列的名称,
:desc
用于按降序排序。
关于elasticsearch - 如何在Elasticsearch 6.3中找到哪个碎片超过30Gb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54189319/
我是一名优秀的程序员,十分优秀!