-
Notifications
You must be signed in to change notification settings - Fork 82
Changed examples deleting Elasticsearch indices #2635
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
base: 5.0
Are you sure you want to change the base?
Conversation
|
Preview of modified Markdown: |
|
|
||
| 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Use the command as in the following example: | |
| Use the commands as in the following example: |
vidarl
left a comment
There was a problem hiding this 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
Preview of modified filesPreview of modified Markdown: |
745700c to
b4003b5
Compare
vidarl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me ( I haven't tested this though)
Feel free to implement my two suggestion or choose to ignore them
| Then, delete them by using the [delete index endpoint](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-delete-index.html) | ||
|
|
||
| ``` bash | ||
| curl --request DELETE 'https://elasticsearch:9200/default_location*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As described in the PR description:
DELETE curl with 'all' is highly destructive and should not be run on elastic.co hosted servers.
Just a suggestion:
So, maybe write that... That if you are hosting ES yourself, and only use if for Ibexa DXP caching, you maybe just do a quick curl --request DELETE 'https://elasticsearch:9200/_all'. But if are using elastic.co hosted services or possibly have other data stored in your ES, then take the long way and check what to explicit delete
| First, use the [`_cat/indices` endpoint](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-indices.html) to list existing indices: | ||
|
|
||
| ``` bash | ||
| yellow open default_location_eng_gb_54 DoSFV-CtQFylKKVvd48YfA 1 1 1 0 16.7kb 16.7kb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly show the exact curl commands for getting this?
5a05eee to
4249e73
Compare
|
Thank you Vidar, added the suggestions in 4249e73 |
|
@ibexa/documentation I've added some changes, you might want to have another look since your last review |
Target: master, 4.6, 3.3
Community feedback:
I've verified locally that it works by running the Elasticsearch container and then executing:
which is enough to solve the issue described in https://issues.ibexa.co/browse/IBX-3758, but potentially less desctuctive.