diff --git a/meilisearch/src/search.rs b/meilisearch/src/search.rs index 5cb8725a6..c32724ec0 100644 --- a/meilisearch/src/search.rs +++ b/meilisearch/src/search.rs @@ -14,7 +14,7 @@ use meilisearch_types::heed::RoTxn; use meilisearch_types::index_uid::IndexUid; use meilisearch_types::milli::score_details::{ScoreDetails, ScoringStrategy}; use meilisearch_types::milli::{ - dot_product_similarity, FacetValueHit, InternalError, SearchForFacetValue, + dot_product_similarity, FacetValueHit, InternalError, SearchForFacetValues, }; use meilisearch_types::settings::DEFAULT_PAGINATION_MAX_TOTAL_HITS; use meilisearch_types::{milli, Document}; @@ -590,7 +590,7 @@ pub fn perform_facet_search( let rtxn = index.read_txn()?; let (search, _, _, _) = prepare_search(index, &rtxn, &search_query)?; - let mut facet_search = SearchForFacetValue::new(facet_name, search); + let mut facet_search = SearchForFacetValues::new(facet_name, search); if let Some(facet_query) = &facet_query { facet_search.query(facet_query); } diff --git a/milli/src/lib.rs b/milli/src/lib.rs index 84ca0ce97..4360eb38e 100644 --- a/milli/src/lib.rs +++ b/milli/src/lib.rs @@ -58,7 +58,7 @@ pub use self::heed_codec::{ pub use self::index::Index; pub use self::search::{ FacetDistribution, FacetValueHit, Filter, FormatOptions, MatchBounds, MatcherBuilder, - MatchingWords, Search, SearchForFacetValue, SearchResult, TermsMatchingStrategy, + MatchingWords, Search, SearchForFacetValues, SearchResult, TermsMatchingStrategy, DEFAULT_VALUES_PER_FACET, }; diff --git a/milli/src/search/mod.rs b/milli/src/search/mod.rs index 28a53e3a9..77f9ce0b8 100644 --- a/milli/src/search/mod.rs +++ b/milli/src/search/mod.rs @@ -13,7 +13,8 @@ use crate::error::UserError; use crate::heed_codec::facet::{FacetGroupKey, FacetGroupValue}; use crate::score_details::{ScoreDetails, ScoringStrategy}; use crate::{ - execute_search, AscDesc, DefaultSearchLogger, DocumentId, Index, Result, SearchContext, BEU16, + execute_search, AscDesc, DefaultSearchLogger, DocumentId, FieldIdMapMissingEntry, Index, + Result, SearchContext, BEU16, }; // Building these factories is not free. @@ -241,15 +242,15 @@ pub fn build_dfa(word: &str, typos: u8, is_prefix: bool) -> DFA { } } -pub struct SearchForFacetValue<'a> { +pub struct SearchForFacetValues<'a> { query: Option, facet: String, search_query: Search<'a>, } -impl<'a> SearchForFacetValue<'a> { - pub fn new(facet: String, search_query: Search<'a>) -> SearchForFacetValue<'a> { - SearchForFacetValue { query: None, facet, search_query } +impl<'a> SearchForFacetValues<'a> { + pub fn new(facet: String, search_query: Search<'a>) -> SearchForFacetValues<'a> { + SearchForFacetValues { query: None, facet, search_query } } pub fn query(&mut self, query: impl Into) -> &mut Self {