mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
fix that AcceptNewFields does not take into account the primary-key; fix #518
This commit is contained in:
parent
14c1aba6c7
commit
c25641ff2d
2 changed files with 63 additions and 2 deletions
|
@ -63,8 +63,10 @@ impl Schema {
|
|||
|
||||
let id = self.insert(name)?;
|
||||
self.primary_key = Some(id);
|
||||
self.set_indexed(name)?;
|
||||
self.set_displayed(name)?;
|
||||
if self.accept_new_fields {
|
||||
self.set_indexed(name)?;
|
||||
self.set_displayed(name)?;
|
||||
}
|
||||
|
||||
Ok(id)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue