Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not recreate Meilisearch index if the primary key is updated #119

Open
pauldn-wttj opened this issue Jul 8, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@pauldn-wttj
Copy link
Owner

pauldn-wttj commented Jul 8, 2024

Original thread: #118 (comment)

Current behavior

After creating a meilisearch_index, changing the primary_key results in a delete / create to replace the index. This behavior is implemented since the UpdateIndex is not available in v0.27.0 of meilisearch-go client. However, it's not ideal since an index may have custom settings we don't want to lose, and Meilisearch API allows us to update an index primary key provided that there are no documents in it.

Expected behavior

After creating a meilisearch_index, if I try to update the primary key:

  • If there are no documents in it, there update proceeds
  • If there are documents, I get an error message from Terraform. I can override the behavior by forcing the replace directly from Terraform.
@pauldn-wttj pauldn-wttj added the enhancement New feature or request label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant