diff --git a/milli/src/lib.rs b/milli/src/lib.rs index 9a9ec428c..6cbb9f126 100644 --- a/milli/src/lib.rs +++ b/milli/src/lib.rs @@ -37,7 +37,7 @@ pub use self::heed_codec::{ }; pub use self::index::Index; pub use self::search::{ - FacetDistribution, Filter, MatcherBuilder, MatchingWords, Search, SearchResult, + FacetDistribution, Filter, MatchBounds, MatcherBuilder, MatchingWords, Search, SearchResult, }; pub type Result = std::result::Result; diff --git a/milli/src/search/matches/mod.rs b/milli/src/search/matches/mod.rs index 816f5e273..e66ba781c 100644 --- a/milli/src/search/matches/mod.rs +++ b/milli/src/search/matches/mod.rs @@ -1,8 +1,7 @@ use std::borrow::Cow; pub use matching_words::MatchingWords; -use meilisearch_tokenizer::token::SeparatorKind; -use meilisearch_tokenizer::{Analyzer, AnalyzerConfig, Token}; +use meilisearch_tokenizer::token::{SeparatorKind, Token}; use crate::search::query_tree::Operation; @@ -91,17 +90,6 @@ impl MatcherBuilder { } } -// impl Default for MatcherBuilder { -// fn default() -> Self { -// Self { -// crop_size: DEFAULT_CROP_SIZE, -// crop_marker: None, -// highlight_prefix: None, -// highlight_suffix: None, -// } -// } -// } - #[derive(Clone, Debug)] pub struct Match { match_len: usize, @@ -115,8 +103,8 @@ pub struct Match { #[derive(Clone, Debug)] pub struct MatchBounds { - start: usize, - length: usize, + pub start: usize, + pub length: usize, } pub struct Matcher<'t, 'm> { diff --git a/milli/src/search/mod.rs b/milli/src/search/mod.rs index 752ae236b..8804d9151 100644 --- a/milli/src/search/mod.rs +++ b/milli/src/search/mod.rs @@ -17,7 +17,7 @@ use roaring::bitmap::RoaringBitmap; pub use self::facet::{FacetDistribution, FacetNumberIter, Filter}; use self::fst_utils::{Complement, Intersection, StartsWith, Union}; -pub use self::matches::{Matcher, MatcherBuilder, MatchingWords}; +pub use self::matches::{MatchBounds, Matcher, MatcherBuilder, MatchingWords}; use self::query_tree::QueryTreeBuilder; use crate::error::UserError; use crate::search::criteria::r#final::{Final, FinalResult};