mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
fix the facet search
This commit is contained in:
parent
bfec9468d4
commit
0ae39644f7
@ -729,8 +729,11 @@ pub fn perform_facet_search(
|
|||||||
features: RoFeatures,
|
features: RoFeatures,
|
||||||
) -> Result<FacetSearchResult, MeilisearchHttpError> {
|
) -> Result<FacetSearchResult, MeilisearchHttpError> {
|
||||||
let before_search = Instant::now();
|
let before_search = Instant::now();
|
||||||
let time_budget = TimeBudget::new(Duration::from_millis(150));
|
|
||||||
let rtxn = index.read_txn()?;
|
let rtxn = index.read_txn()?;
|
||||||
|
let time_budget = match index.search_cutoff(&rtxn)? {
|
||||||
|
Some(cutoff) => TimeBudget::new(Duration::from_millis(cutoff)),
|
||||||
|
None => TimeBudget::default(),
|
||||||
|
};
|
||||||
|
|
||||||
let (search, _, _, _) =
|
let (search, _, _, _) =
|
||||||
prepare_search(index, &rtxn, &search_query, features, None, time_budget)?;
|
prepare_search(index, &rtxn, &search_query, features, None, time_budget)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user