I installed debian package
I am able to push data using curl:
curl -XPUT 'http://mybox:9200/blog/user/dilbert' -d '{
"name": "Dilbert Brown"
}'
And fetch it
curl -XGET 'http://mybox:9200/blog/user/dilbert'
result:
{
"_index": "blog",
"_type": "user",
"_id": "dilbert",
"_version": 2,
"exists": true,
"_source": {
"name": "Dilbert Brown"
}
}
And find it with
curl -XGET 'http://mybox:9200/blog/user/_search?q=name:Dilbert+Brown&pretty=True'
I want to push the same record with ttl of 5 seconds and 5 seconds later get 404 http status code when trying to fetch this entry. Also the entry should not be visible in search results.
NOTE: I tried various combinations of search configurations from
- http://www.elasticsearch.org/guide/reference/mapping/ttl-field/
- http://www.elasticsearch.org/guide/reference/api/index_/
- http://elasticsearch-users.115913.n3.nabble.com/TTL-in-elastic-search-is-not-working-td4034844.html
None of them helped me out.
Can somebody mention a simple sequence of steps that would let me achieve the targeted outcome?
?ttl=5000
inPUT
and then tryGET
ting it later? – bereal