2016-03-28 54 views
0

我设置TTL模板是这样的:TTL在Elasticsearch不工作

curl -XPUT 'localhost:9200/_template/keyword' -d ' 
{ 
    "template": "keyword*", 
    "mappings": { 
     "fluentd": { 
      "_source": { 
      "compress": true 
      }, 
      "_ttl": { 
      "enabled": true, 
      "default": "120d" 
      }, 
      "properties": { 
      .... 
      } 
     } 
    } 
}' 

当我检查映射我得到这个:

"keyword-2016.02.16": { 
    "mappings": { 
    "fluentd": { 
     "_all": { 
      "enabled": false 
     }, 
     "_ttl": { 
      "enabled": true, 
      "default": 10368000000 
     }, 
     "_source": { 
      "compress": true 
     }, 
     "properties": { 
      ..... 
     } 
    } 
    } 

但TTL到期后,指数不会被删除。你知不知道可能是什么问题?

此外,在Kibana我得到这个:

Kibana

回答

0

TTL控制文件过期,没有索引。这意味着索引不会被TTL删除。