mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
no id returned; fix #492
This commit is contained in:
parent
54c675e195
commit
041eed2a06
2 changed files with 42 additions and 3 deletions
|
@ -21,13 +21,21 @@ impl Schema {
|
|||
let mut fields_map = FieldsMap::default();
|
||||
let field_id = fields_map.insert(name).unwrap();
|
||||
|
||||
let mut displayed = HashSet::new();
|
||||
let mut indexed = Vec::new();
|
||||
let mut indexed_map = HashMap::new();
|
||||
|
||||
displayed.insert(field_id);
|
||||
indexed.push(field_id);
|
||||
indexed_map.insert(field_id, 0.into());
|
||||
|
||||
Schema {
|
||||
fields_map,
|
||||
identifier: field_id,
|
||||
ranked: HashSet::new(),
|
||||
displayed: HashSet::new(),
|
||||
indexed: Vec::new(),
|
||||
indexed_map: HashMap::new(),
|
||||
displayed,
|
||||
indexed,
|
||||
indexed_map,
|
||||
accept_new_fields: true,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue