Rollover index creates a concrete index using alias

I have a job which runs daily to rollover the index when the creation time is greater than a certain period eg. 167hrs. But sometimes when the job runs, it does not rollover but creates concrete indices of alias.

API request and response:
Array
(
[newIndex] => 1-emails-index-2018-08-13-1
[alias] => 1-emails-index
[body] => Array
(
[conditions] => Array
(
[max_age] => 167h
)
[aliases] => Array
(
[1-emails-index-search] => stdClass Object
(
)
)
[settings] => Array
(
[number_of_shards] => 1
[number_of_replicas] => 3
)
)
)
{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[i-0d69a7ef7e924b55b][172.17.5.70:9300][indices:admin/rollover]"}],"type":"illegal_argument_exception","reason":"source alias is a concrete index"},"status":400}

I am fairly certain that the "1-emails-index-search" index did not exist before the job ran, so I think there is some inconsistency in the rollover API which sometimes create the concrete index rather than rolling over the existing index and adding the "1-emails-index-search" alias.

Is my observation valid?
Is there a check or param that we can add into the body which prevents this concrete index from being created.

By the way, I use php elastic client to send this rollover request.

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