Binh,

Where to execute the command you have given me.  I don't know how to 
execute. Is there any tool to run curl ?   I'm using sense plug in. 

I'm trying to do like below in sense -   How to make sure its enabled after 
running this command. 


*local-test - Index.*
*logs-test  - Type. *
 
PUT /local-test/logs-test/_mapping
{
  "mappings": {
    "logs-test": {
      "_ttl" : {"enabled": true}
    }
  }
}



On Thursday, March 27, 2014 3:23:15 PM UTC-4, Binh Ly wrote:
>
> 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/78b4b2a5-ea9b-4c55-9798-d2c8655dd0cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to