Skip to content

How to set ttl. #64

@songoo

Description

@songoo

How can i set "ttl" "time to live" on index (so all results older than 60s would get removed from search for example https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-ttl-field.html)

i tried to use custom settings part:

"## 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. is there need for another setting or have i set it with some kind of annotation? Currently have only one annotation
"@IndexType(name = "searchResult")
public class SearchResult extends Index { ..."

Or maybe is missing specification for timestamp (also some kind of annotation?)

Tnx for help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions