我如何设置index.routing.allocation.*
设置,例如:
PUT test/_settings
{
"index.routing.allocation.include.size": "big,medium"
}
对于带有Java API的test
索引?
答案 0 :(得分:0)
试试这段代码:
Settings settings = Settings.settingsBuilder()
.put("index.routing.allocation.include.size", "big,medium")
.build();
client.admin().indices().prepareCreate("test")
.setSettings(settings)
.execute().actionGet()