mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Limit the number of values returned by the facet search
This commit is contained in:
parent
93363b0201
commit
3f3462ab62
3 changed files with 38 additions and 5 deletions
|
@ -735,6 +735,9 @@ pub fn perform_facet_search(
|
|||
if let Some(facet_query) = &facet_query {
|
||||
facet_search.query(facet_query);
|
||||
}
|
||||
if let Some(max_facets) = index.max_values_per_facet(&rtxn)? {
|
||||
facet_search.max_values(max_facets as usize);
|
||||
}
|
||||
|
||||
Ok(FacetSearchResult {
|
||||
facet_hits: facet_search.execute()?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue