mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
Use new matcher in http-ui
This commit is contained in:
@ -36,7 +36,9 @@ pub use self::heed_codec::{
|
||||
RoaringBitmapLenCodec, StrBEU32Codec, StrStrU8Codec,
|
||||
};
|
||||
pub use self::index::Index;
|
||||
pub use self::search::{FacetDistribution, Filter, MatchingWords, Search, SearchResult};
|
||||
pub use self::search::{
|
||||
FacetDistribution, Filter, MatcherBuilder, MatchingWords, Search, SearchResult,
|
||||
};
|
||||
|
||||
pub type Result<T> = std::result::Result<T, error::Error>;
|
||||
|
||||
|
@ -34,6 +34,16 @@ impl MatcherBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_matching_words(matching_words: MatchingWords) -> Self {
|
||||
Self {
|
||||
matching_words,
|
||||
crop_size: DEFAULT_CROP_SIZE,
|
||||
crop_marker: None,
|
||||
highlight_prefix: None,
|
||||
highlight_suffix: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn crop_size(&mut self, word_count: usize) -> &Self {
|
||||
self.crop_size = word_count;
|
||||
self
|
||||
|
Reference in New Issue
Block a user