title: Elasticsearch: Auto Indices Deletion/Expiry
body: <p>I want to configure my elasticsearch 0.19.11 to delete indexes every 60s. My elasticsearch config has these 3 lines:</p>
  
  <pre><code>node.name: "Saurajeet"
  index.ttl.disable_purge: false
  index.ttl.interval: 60s
  indices.ttl.interval: 60s
  </code></pre>
  
  <p>And its not working
  I have 2 default docs indexed. And would be expecting it to go after 60s</p>
  
  <pre><code>$ curl -XGET http://localhost:9200/twitter/_settings?pretty=true
  {
    "twitter" : {
      "settings" : {
        "index.version.created" : "191199",
        "index.number_of_replicas" : "1",
        "index.number_of_shards" : "5"
      }
  }
  </code></pre>
  
  <p>Also if i m trying to do the following it doesnot have any effect</p>
  
  <pre><code>$ curl -XPUT http://localhost:9200/twitter/_settings -d '
  &gt; { "twitter": {
  &gt;     "settings" : {
  &gt;       "index.ttl.interval": "60s"
  &gt;    }
  &gt;  }
  &gt; }
  &gt; '
  {"ok":true}~/bin/elasticsearc
  $ curl -XGET http://localhost:9200/twitter/_settings?pretty=true
  {
    "twitter" : {
      "settings" : {
        "index.version.created" : "191199",
        "index.number_of_replicas" : "1",
        "index.number_of_shards" : "5"
      }
    }
  }
  </code></pre>
  
  <p>I have indexes 2 documents and its still showing up after 1hr</p>
  
  <pre><code>$ curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '
  { 
      "user": "kimchy", 
      "postDate": "2009-11-15T13:12:00", 
      "message": "Trying out Elastic Search, so far so good?" 
  }'
  $ curl -XPUT 'http://localhost:9200/twitter/tweet/2' -d '
  { 
      "user": "kimchy", 
      "postDate": "2009-11-15T13:12:00", 
      "message": "Trying out Elastic Search, so far so good?" 
  }'
  </code></pre>
  
  <p><strong>WHAT DID I DO WRONG</strong></p>
  
  <p>P.S. I want to deploy this config with logstash. So any other alternative can be suggested.
  for scaling reasons i dont want this autopurge to be a script.</p>