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

Changed examples deleting Elasticsearch indices #2635

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mnocon
Copy link
Contributor

@mnocon mnocon commented Feb 25, 2025

Target: master, 4.6, 3.3

Community feedback:

Hi, can you please update https://doc.ibexa.co/en/latest/update_and_migration/from_4.5/update_from_4.5/#updateelasticsearch-schema 
to indicate that the DELETE curl with 'all' is highly destructive and should not be run on elastic.co hosted servers.
instead the curl should target the specific CMS indexes like 'default*'

I've verified locally that it works by running the Elasticsearch container and then executing:

php bin/console ibexa:reindex
curl --request DELETE 'http://0.0.0.0:9200/default_content*'
curl --request DELETE 'http://0.0.0.0:9200/default_location*'
php bin/console ibexa:elasticsearch:put-index-template
php bin/console ibexa:reindex

which is enough to solve the issue described in https://issues.ibexa.co/browse/IBX-3758, but potentially less desctuctive.

Copy link

@mnocon mnocon marked this pull request as ready for review February 25, 2025 14:11
@mnocon mnocon requested review from vidarl and a team February 25, 2025 14:11
@@ -463,11 +463,12 @@ Restart Solr for `solrconfig.xml` changes to take effect.
Elasticsearch schema's templates change, for example, with the addition of new features such as spellchecking.
When this happens, you need to erase the index, update the schema, and rebuild the index.

To delete the index, you can use an HTTP request.
To delete the index, use the [delete index REST API](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-delete-index.html).
Use the command as in the following example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use the command as in the following example:
Use the commands as in the following example:

Copy link
Contributor

@vidarl vidarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. I am not sure how destructive it is when running on elastic.co servers ( if it deletes metadata needed by the service too ?), but if we don't delete everything, we must document better what we delete. These default_ values comes from the template, https://doc.ibexa.co/en/latest/search/search_engines/elasticsearch/configure_elasticsearch/#define-a-template

So with out-of-the-box config, the new documentation is correct. But with changed templates, the commands needs to be adjusted accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants