mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Merge branch 'stable'
fix conflict with master
This commit is contained in:
commit
9992c36ced
4 changed files with 17 additions and 7 deletions
|
@ -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() {
|
||||
|
|
|
@ -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"],
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue