update the primary key when creating a new index

This commit is contained in:
Tamo 2021-10-20 14:29:08 +02:00 committed by marin postma
parent cfcd3ae048
commit 1d73f484f0
No known key found for this signature in database
GPG Key ID: 6088B7721C3E39F9

View File

@ -63,7 +63,7 @@ pub async fn create_index(
analytics.publish(
"Index Created".to_string(),
json!({ "with_primary_key": body.primary_key}),
json!({ "primary_key": body.primary_key}),
Some(&req),
);
let meta = meilisearch.create_index(body.uid, body.primary_key).await?;
@ -107,7 +107,7 @@ pub async fn update_index(
let body = body.into_inner();
analytics.publish(
"Index Updated".to_string(),
json!({ "with_primary_key": body.primary_key}),
json!({ "primary_key": body.primary_key}),
Some(&req),
);
let settings = IndexSettings {