After creating a rollup job and deleting it we are unable to create a job again with the same id.
POST /_xpack/rollup/job/foo
{
"error": {
"root_cause": [
{
"type": "status_exception",
"reason": "Cannot create rollup job [foo] because job was previously created (existing metadata)."
}
],
"type": "status_exception",
"reason": "Cannot create rollup job [foo] because job was previously created (existing metadata)."
},
"status": 409
}
We've read through the docs but the following does not help:
POST /rollup-test/_delete_by_query
{
"query": {
"term": {
"_rollup.id": "foo"
}
}
}
Here is the creation script:
POST /_xpack/rollup/job/foo
{
"index_pattern": "access-test",
"rollup_index": "rollup-test",
"cron": "0 0 1 * * ?",
"page_size": 100,
"groups": {
"date_histogram": {
"field": "timestamp",
"interval": "1d"
},
"terms": {
"fields": ["category", "subcategory", "method"]
}
},
"metrics": [
{
"field": "timeTaken",
"metrics": ["min", "max", "avg"]
}
]
}
We want to delete and re-create the job because there doesn't seem to be a way to change/update a rollup job once it's created. Only GET, CREATE and DELETE.
How can we delete the metadata so we can re-create the job?