Skip to content

[Bug]: Reindex fails if alias exists #412

@ascheider

Description

@ascheider

If previous index failed and was interrupted, you can not reindex again, because alias exists: bin/console generic-data-index:deployment:reindex

The exception is thrown:

Failed to update Aliases: {"error":{"root_cause":[{"type":"invalid_alias_name_exception","reason":"Invalid alias name [studio_demo_pimcoredata-object_uebung1], an index exists with the same name as the alias","index":"studio_demo_pimcoredata-object_uebung1","index_uuid":"Cv-f0BF4TjiHuyl-LVeb6g"}],"type":"invalid_alias_name_exception","reason":"Invalid alias name [studio_demo_pimcoredata-object_uebung1], an index exists with the same name as the alias","index":"studio_demo_pimcoredata-object_uebung1","index_uuid":"Cv-f0BF4TjiHuyl-LVeb6g"},"status":400}

You have then to delete index manually with curl for example, so the reindex is possible again: curl -X DELETE "http://127.0.0.1:9200/studio_demo_pimcoredata-object_uebung1"

Maybe patch the method like this https://github.com/pimcore/generic-data-index-bundle/blob/2026.x/src/Service/SearchIndex/IndexService/IndexHandler/AbstractIndexHandler.php#L142

Image

Then no error appear anymore and you do not need to delete manually

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions