fix update system

This commit is contained in:
qdequele 2020-01-22 14:29:39 +01:00
parent 58fe87067b
commit f77f38dfa0
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
6 changed files with 50 additions and 40 deletions

View file

@ -84,7 +84,9 @@ impl DataInner {
let mut fields_frequency = HashMap::<_, usize>::new();
for result in all_documents_fields {
let (_, attr, _) = result?;
*fields_frequency.entry(schema.indexed_pos_to_field_id(attr).unwrap()).or_default() += 1;
if let Some(field_id) = schema.indexed_pos_to_field_id(attr) {
*fields_frequency.entry(field_id).or_default() += 1;
}
}
// convert attributes to their names