mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
rename name to uid in code
This commit is contained in:
parent
0c80d891c0
commit
01479dcf99
4 changed files with 44 additions and 44 deletions
|
@ -65,15 +65,15 @@ impl Data {
|
|||
|
||||
pub async fn update_index(
|
||||
&self,
|
||||
name: impl AsRef<str>,
|
||||
uid: impl AsRef<str>,
|
||||
primary_key: Option<impl AsRef<str>>,
|
||||
new_name: Option<impl AsRef<str>>
|
||||
new_uid: Option<impl AsRef<str>>
|
||||
) -> anyhow::Result<IndexMetadata> {
|
||||
let settings = IndexSettings {
|
||||
uid: new_name.map(|s| s.as_ref().to_string()),
|
||||
uid: new_uid.map(|s| s.as_ref().to_string()),
|
||||
primary_key: primary_key.map(|s| s.as_ref().to_string()),
|
||||
};
|
||||
|
||||
self.index_controller.update_index(name.as_ref().to_string(), settings).await
|
||||
self.index_controller.update_index(uid.as_ref().to_string(), settings).await
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue