Merge branch 'stable'

fix conflict with master
This commit is contained in:
mpostma 2021-03-16 16:59:39 +01:00
commit 9992c36ced
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
4 changed files with 17 additions and 7 deletions

View file

@ -175,7 +175,6 @@ async fn update_multiple_documents(
.ok_or(meilisearch_core::Error::SchemaMissing)?;
match (params.into_inner().primary_key, schema.primary_key()) {
(Some(_), Some(_)) => return Err(meilisearch_schema::Error::PrimaryKeyAlreadyPresent.into()),
(Some(key), None) => document_addition.set_primary_key(key),
(None, None) => {
let key = body
@ -184,7 +183,7 @@ async fn update_multiple_documents(
.ok_or(meilisearch_core::Error::MissingPrimaryKey)?;
document_addition.set_primary_key(key);
}
(None, Some(_)) => ()
_ => ()
}
for document in body.into_inner() {

View file

@ -171,6 +171,8 @@ async fn write_all_and_update() {
"synonyms": {
"road": ["street", "avenue"],
"street": ["avenue"],
"HP": ["Harry Potter"],
"Harry Potter": ["HP"]
},
"attributesForFaceting": ["title"],
});
@ -208,6 +210,8 @@ async fn write_all_and_update() {
"synonyms": {
"road": ["street", "avenue"],
"street": ["avenue"],
"hp": ["harry potter"],
"harry potter": ["hp"]
},
"attributesForFaceting": ["title"],
});