File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1508,6 +1508,12 @@ webhooks_patch_1: |-
15081508webhooks_delete_1 : |-
15091509 curl \
15101510 -X DELETE 'MEILISEARCH_URL/webhooks/WEBHOOK_UUID'
1511+ rename_an_index_1 : |-
1512+ curl \
1513+ -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \
1514+ -H 'Content-Type: application/json' \
1515+ --data-binary '{ "uid": "INDEX_B" }'
1516+
15111517
15121518# ## Code samples for experimental features
15131519experimental_get_metrics_1 : |-
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ title: Rename an index
33description : Use the PATCH endpoint of the /indexes route to rename an index
44---
55
6+ import CodeSamplesRenameAnIndex1 from '/snippets/samples/code_samples_rename_an_index_1.mdx';
7+
68This guide shows you how to change the name of an index.
79
810## Requirements
@@ -20,11 +22,6 @@ Also choose the new name you wish to assign the index. This guide uses `INDEX_B`
2022
2123Send a ` PATCH ` request targeting the index you want to rename:
2224
23- ``` sh
24- curl \
25- -X PATCH ' MEILISEARCH_URL/indexes/INDEX_A' \
26- -H ' Content-Type: application/json' \
27- --data-binary ' { "uid": "INDEX_B" }'
28- ```
25+ <CodeSamplesRenameAnIndex1 />
2926
3027Replace ` INDEX_A ` with the current name of your index, and ` INDEX_B ` with its new name.
You can’t perform that action at this time.
0 commit comments