mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Use new matcher in http-ui
This commit is contained in:
parent
734d0899d3
commit
29c5f76d7f
3 changed files with 26 additions and 29 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue