feat(index): store fields distribution in index

This commit is contained in:
Alexey Shekhirin
2021-03-31 18:14:23 +03:00
parent 67e25f8724
commit 27c7ab6e00
5 changed files with 45 additions and 26 deletions

View File

@ -358,6 +358,7 @@ impl<'t, 'u, 'i, 'a> IndexDocuments<'t, 'u, 'i, 'a> {
let TransformOutput {
primary_key,
fields_ids_map,
fields_distribution,
external_documents_ids,
new_documents_ids,
replaced_documents_ids,
@ -551,6 +552,9 @@ impl<'t, 'u, 'i, 'a> IndexDocuments<'t, 'u, 'i, 'a> {
// We write the fields ids map into the main database
self.index.put_fields_ids_map(self.wtxn, &fields_ids_map)?;
// We write the fields distribution into the main database
self.index.put_fields_distribution(self.wtxn, &fields_distribution)?;
// We write the primary key field id into the main database
self.index.put_primary_key(self.wtxn, &primary_key)?;