Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElasticSearch storage: Use multiple indices to make it possible to use curator for retention management #23

Open
leo-labs opened this issue Jan 14, 2021 · 1 comment

Comments

@leo-labs
Copy link
Member

It should be possible to use instead of one very large index multiple indices e.g. one per week. That would allow the use of curator (https://www.elastic.co/guide/en/elasticsearch/client/curator/5.8/index.html) for automatic deletion of older data.

@leo-labs
Copy link
Member Author

Right now, to delete old (older than 3 months) emails:

POST elasticsearch:9200/<index-name>/_delete_by_query
{
  "query": {
    "bool": {
      "filter" : [
                { "range" : { "firstProcessed" : { "lte" : "now-3M"}}}
       ]
    }
  }
}

To free up space:

http://elasticsearch:9200/<index-name>/_forcemerge?only_expunge_deletes=true
``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant