[英]Get list of index names matching pattern from elastic search - JAVA
我在彈性搜索中有一個索引列表如下:
index1, index2, index3, test-index1, test-index2, test-index3
現在我只想要那些匹配我的模式“test- *”的索引。
我可以通過跟隨感知查詢來實現上述結果:
GET test-*/_aliases
我想從java代碼中獲得相同的結果。
響應/test-*/_aliases
的REST端點執行以下操作( 請參見此處 ):
GetAliasesResponse getAliasesResponse = client().admin().indices()
.prepareGetAliases()
.setIndices("test-*", "index-*").get();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.