elasticsearch - 是否可以动态设置indices.ttl.interval

时间:2015-03-12 10:03:10

标签: indexing elasticsearch

是否可以动态设置索引 - indices.ttl.interval?

我试过,并得到此异常:无法更新非动态设置。

1 个答案:

答案 0 :(得分:1)

Didn't find correct documentation for the correct syntax, so with fews try i succeeded  :
PUT to : localhost:9200/_cluster/settings
body: 
{
    "persistent" : {
        "indices.ttl.interval" : "120"
    }
}

it will survive the restart.

or

{
    "transient" : {
        "indices.ttl.interval" : "120"
    }
}

it will take effect until you restart the service