diff --git a/docs/ansible/wiki/elk/re-indexing.md b/docs/ansible/wiki/elk/re-indexing.md index 507a46775af5e02f616bf291177b99da0e3cdc15..49659788c93f9148e0fdcab3814be610b1ecbd5b 100644 --- a/docs/ansible/wiki/elk/re-indexing.md +++ b/docs/ansible/wiki/elk/re-indexing.md @@ -13,13 +13,13 @@ We use `$IDX` for the existing, e.g. broken index and `$IDXNEW` for the new one. ## Show number of records for all indexes ```shell -curl -X GET 'http://${ELUSER}:${ELPASS}@localhost:9200//_cat/indices/%2A?v=&s=index:desc' +curl -X GET http://${ESUSER}:${ESPASS}@localhost:9200/_cat/indices/%2A?v=&s=index:desc ``` ## Create new index with mappings ```shell -curl -X PUT http://${ELUSER}:${ELPASS}@localhost:9200/$IDXNEW \ +curl -X PUT http://${ESUSER}:${ESPASS}@localhost:9200/$IDXNEW \ -H 'Content-Type: application/json' \ -d '{ "mappings": { @@ -33,7 +33,7 @@ curl -X PUT http://${ELUSER}:${ELPASS}@localhost:9200/$IDXNEW \ ## Re-index from old to new index ```shell -curl -X POST http://${ELUSER}:${ELPASS}@localhost:9200/_reindex \ +curl -X POST http://${ESUSER}:${ESPASS}@localhost:9200/_reindex \ -H 'Content-Type: application/json' \ -d '{ "source": { @@ -48,13 +48,13 @@ curl -X POST http://${ELUSER}:${ELPASS}@localhost:9200/_reindex \ ## Delete the old index ```shell -curl -X DELETE http://${ELUSER}:${ELPASS}@localhost:9200/$IDX +curl -X DELETE http://${ESUSER}:${ESPASS}@localhost:9200/$IDX ``` ## Delete and recreate alias ```shell -curl -X POST http://${ELUSER}:${ELPASS}@localhost:9200/_aliases \ +curl -X POST http://${ESUSER}:${ESPASS}@localhost:9200/_aliases \ -H 'Content-Type: application/json' \ -d '{ "actions": [ @@ -69,7 +69,7 @@ curl -X POST http://${ELUSER}:${ELPASS}@localhost:9200/_aliases \ ``` ```shell -curl -X POST http://${ELUSER}:${ELPASS}@localhost:9200/_aliases \ +curl -X POST http://${ESUSER}:${ESPASS}@localhost:9200/_aliases \ -H 'Content-Type: application/json' \ -d '{ "actions": [