Can Curator filters documents during reindexation?

Hi,

I'm using curator for reindex daily indices into weekly/montly indices and it's work fine.

The current treatment takes all the documents and create the new index, but can curator excludes some documents (filter on a field value) or deletes some fields of a document ?

I managed to reindex with deletion of these specific documents/fields by the _reindex API, but I 'ld rather use curator to make this action.

Thanks for the answer
Best regards

François

The answer to this is a resounding yes. Curator just uses YAML syntax to do anything that you can do with the regular reindex API.

For example, given this JSON reindex block:

POST _reindex
{
  "source": {
    "index": "twitter",
    "type": "_doc",
    "query": {
      "term": {
        "user": "kimchy"
      }
    }
  },
  "dest": {
    "index": "new_twitter"
  }
}

You would create a YAML request_body like this:

request_body:
  source:
    index: twitter
    type: _doc
    query:
      term:
        user: kimchy
  dest:
    index: new_twitter

Thanks a lot !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.