Make sure that we generate the faceted database when required

This commit is contained in:
Kerollmops
2021-06-01 16:29:14 +02:00
parent b0c0490e85
commit 3c304c89d4
5 changed files with 135 additions and 42 deletions

View File

@ -136,7 +136,7 @@ impl<'a> Search<'a> {
let criteria_builder = criteria::CriteriaBuilder::new(self.rtxn, self.index)?;
let criteria = criteria_builder.build(query_tree, primitive_query, filtered_candidates)?;
match self.index.distinct_attribute(self.rtxn)? {
match self.index.distinct_field(self.rtxn)? {
None => self.perform_sort(NoopDistinct, matching_words, criteria),
Some(name) => {
let field_ids_map = self.index.fields_ids_map(self.rtxn)?;