0

我如何设置index.routing.allocation.*设置,例如:

PUT test/_settings
{
  "index.routing.allocation.include.size": "big,medium"
}

test使用 Java API的索引?

4

1 回答 1

0

试试这个代码:

Settings settings = Settings.settingsBuilder()
.put("index.routing.allocation.include.size", "big,medium")
.build();

client.admin().indices().prepareCreate("test")
.setSettings(settings)
.execute().actionGet()
于 2016-09-01T11:58:23.670 回答