From 4fc8f06791ae511d49f2819a9ec806a8d76ca30b Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Wed, 23 Jun 2021 17:25:39 +0200 Subject: [PATCH] Rename faceted_fields into filterable_fields --- milli/src/update/index_documents/store.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/milli/src/update/index_documents/store.rs b/milli/src/update/index_documents/store.rs index b187b642c..9ac97c255 100644 --- a/milli/src/update/index_documents/store.rs +++ b/milli/src/update/index_documents/store.rs @@ -55,7 +55,7 @@ pub struct Readers { pub struct Store<'s, A> { // Indexing parameters searchable_fields: HashSet, - faceted_fields: HashSet, + filterable_fields: HashSet, // Caches word_docids: LinkedHashMap, RoaringBitmap>, word_docids_limit: usize, @@ -90,7 +90,7 @@ pub struct Store<'s, A> { impl<'s, A: AsRef<[u8]>> Store<'s, A> { pub fn new( searchable_fields: HashSet, - faceted_fields: HashSet, + filterable_fields: HashSet, linked_hash_map_size: Option, max_nb_chunks: Option, max_memory: Option, @@ -190,7 +190,7 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> { Ok(Store { // Indexing parameters. searchable_fields, - faceted_fields, + filterable_fields, // Caches word_docids: LinkedHashMap::with_capacity(linked_hash_map_size), field_id_word_count_docids: HashMap::new(), @@ -668,12 +668,13 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> { } for (attr, content) in document.iter() { - if self.faceted_fields.contains(&attr) || self.searchable_fields.contains(&attr) + if self.filterable_fields.contains(&attr) + || self.searchable_fields.contains(&attr) { let value = serde_json::from_slice(content).map_err(InternalError::SerdeJson)?; - if self.faceted_fields.contains(&attr) { + if self.filterable_fields.contains(&attr) { let (facet_numbers, facet_strings) = extract_facet_values(&value); facet_numbers_values .entry(attr)