mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
bug(lib): ignore primary if already set on document addition
This commit is contained in:
parent
5af51c852c
commit
d534a7f7c8
2 changed files with 26 additions and 1 deletions
|
@ -237,7 +237,9 @@ impl Index {
|
|||
let mut txn = self.write_txn()?;
|
||||
|
||||
if let Some(primary_key) = primary_key {
|
||||
self.update_primary_key_txn(&mut txn, primary_key)?;
|
||||
if self.primary_key(&txn)?.is_none() {
|
||||
self.update_primary_key_txn(&mut txn, primary_key)?;
|
||||
}
|
||||
}
|
||||
|
||||
let indexing_callback = |indexing_step| debug!("update: {:?}", indexing_step);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue