babenkoivan / elastic-migrations

Elasticsearch migrations for Laravel
MIT License
188 stars 32 forks source link

Indicate that `migrate:fresh` does not work by default in the documentation #49

Closed Nacoma closed 1 year ago

Nacoma commented 1 year ago

Elastic versions <=7.17 allow deleting indexes with a wildcard by default. At some point this was changed to disallow by default. It would be helpful to add a note about this in the documentation, logs, or exception message.

php artisan elastic:migrate:fresh

  400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Wildcard expressions or all indices are not allowed"}],"type":"illegal_argument_exception","reason":"Wildcard expressions or all indices are not allowed"},"status":400}

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html#delete-index-api-path-params

babenkoivan commented 1 year ago

Hey @Nacoma, thank you for pointing that out! I've mentioned it in this section.