Enabling TTL in ES is actually very easy. Here's a mapping to enable _ttl:

curl -XPUT 'localhost:9200/ttltest'
{
  "mappings": {
    "doc": {
      "_ttl" : {"enabled": true},
      "properties": {
        "foo": {
          "type": "string"
        }
      }
    }
  }
}

And then when you index a document, just specify a ttl value:

curl -XPUT 'http://localhost:9200/ttltest/doc/1?ttl=1d' -d '{ }'

And the above do will automatically get deleted after 1 day.

The part I do not know is if that river you are using has ttl capabilities, 
and if yes, how do you configure it from the river?

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/877f7915-31a8-4e31-84e6-06d8b2e0d383%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to