How can i set "ttl" "time to live" on index (so all results older than "60s" would get removed from search for example in play2-elasticsearch (https://github.com/cleverage/play2-elasticsearch) .
In classic elastic search it could be done with https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-ttl-field.html
play2-elasticsearch has option for settings, i tried to use this change
## Custom settings to apply when creating the index (optional) elasticsearch.index.settings="{'_ttl' : { 'enabled' : true, 'default' : '60s' }"
But results are still searchable even after hour.
My search result entity is annotated this way :
@IndexType(name = "searchResult") public class SearchResult extends Index { ...
(answered by issue ticket https://github.com/cleverage/play2-elasticsearch/issues/64)