Changed examples deleting Elasticsearch indices - #2635
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.
| 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.
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.
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.
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.
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 |
* Changed examples deleting Elasticsearch indices * Added mention about custom indices. Extrcted to snippet * Adjusted to ES 8.19 * Made path absolute * Fixed typo * Review feedback * Update docs/snippets/elasticsearch_clear_index.md
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.