File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 277277 {
278278 "group" : " Indexing" ,
279279 "pages" : [
280+ " learn/indexing/rename_an_index" ,
280281 " learn/indexing/indexing_best_practices" ,
281282 " learn/indexing/ram_multithreading_performance" ,
282283 " learn/indexing/tokenization"
Original file line number Diff line number Diff line change 1+ ---
2+ title : Rename an index
3+ description : Use the PATCH endpoint of the /indexes route to rename an index
4+ ---
5+
6+ This guide shows you how to change the name of an index.
7+
8+ ## Requirements
9+
10+ - A Meilisearch project with at least one index
11+ - A command-line terminal
12+
13+ ## Choose the target index and its new name
14+
15+ Decide which index you want to rename and keep note of its ` uid ` . This guide changes the name of an index called ` INDEX_A ` .
16+
17+ Also choose the new name you wish to assign the index. This guide uses ` INDEX_B ` for the new name of the index.
18+
19+ ## Query the ` /indexes/{index_uid} ` route
20+
21+ Send a ` PATCH ` request targeting the index you want to rename:
22+
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+ ```
29+
30+ Replace ` 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