Use the faceted_fields_ids method to fetch the ids

This commit is contained in:
Kerollmops 2021-01-26 14:12:16 +01:00
parent b0c31500fc
commit 916dd3b7c5
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ impl FacetCondition {
} }
let fields_ids_map = index.fields_ids_map(rtxn)?; let fields_ids_map = index.fields_ids_map(rtxn)?;
let faceted_fields = index.faceted_fields(rtxn)?; let faceted_fields = index.faceted_fields_ids(rtxn)?;
let mut ands = None; let mut ands = None;
for either in array { for either in array {

View File

@ -173,7 +173,7 @@ impl<'a> FacetDistribution<'a> {
pub fn execute(&self) -> heed::Result<BTreeMap<String, BTreeMap<FacetValue, u64>>> { pub fn execute(&self) -> heed::Result<BTreeMap<String, BTreeMap<FacetValue, u64>>> {
let fields_ids_map = self.index.fields_ids_map(self.rtxn)?; let fields_ids_map = self.index.fields_ids_map(self.rtxn)?;
let faceted_fields = self.index.faceted_fields(self.rtxn)?; let faceted_fields = self.index.faceted_fields_ids(self.rtxn)?;
let fields_ids: Vec<_> = match &self.facets { let fields_ids: Vec<_> = match &self.facets {
Some(names) => { Some(names) => {
names.iter().filter_map(|n| { names.iter().filter_map(|n| {