Hi guys, I am having an issue with rolling over indices.
So, We were trying a rollover indice with our newly setup cluster with Elasticsearch 6.2
When we are trying to rollover the indice, It gives the following error.
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Rollover alias [active-fusion-logs] can point to multiple indices, found duplicated alias [[search-fusion-logs, active-fusion-logs]] in index template [fusion-logs]"
}
],
"type": "illegal_argument_exception",
"reason": "Rollover alias [active-fusion-logs] can point to multiple indices, found duplicated alias [[search-fusion-logs, active-fusion-logs]] in index template [fusion-logs]"
},
"status": 400
}
Please find details below of the template that we are having and steps that I used. This can be fairly used to reproduce the issue.
Template name : fusion-logs
PUT _template/fusion-logs
{
"template": "fusion-logs-*",
"settings": {
"number_of_shards": 2,
"number_of_replicas": 1,
"routing.allocation.include.box_type": "hot"
},
"aliases": {
"active-fusion-logs": {},
"search-fusion-logs": {}
},
"mappings": {
"logs": {
"properties": {
"host": {
"type": "keyword"
},
"job_id": {
"type": "keyword"
},
"job_result": {
"type": "keyword"
}
}
}
}
}
We inserted a 1000 documents in the above active-fusion-logs index and then used the following to roll over the index
POST active-fusion-logs/_rollover
{
"conditions": {
"max_docs": 1000
}
}
The above API gives us an error when we are trying to rollover
Some other info about the cluster.
- There is no other index other than the above index.
- active-fusion-logs is aliased to just one write index
- search-fusion-logs is aliased to multiple indexes
Also, I had tried the same thing with Elasticsearch 5.3.2 and it worked as expected without the error.