mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 08:41:00 +00:00
add error on search with empty facets
This commit is contained in:
@ -87,10 +87,8 @@ async fn search_with_url_query(
|
||||
}
|
||||
|
||||
if let Some(ref facet_filters) = params.facet_filters {
|
||||
let attrs = index.main.attributes_for_faceting(&reader)?;
|
||||
if let Some(attrs) = attrs {
|
||||
search_builder.add_facet_filters(FacetFilter::from_str(facet_filters, &schema, &attrs)?);
|
||||
}
|
||||
let attrs = index.main.attributes_for_faceting(&reader)?.unwrap_or_default();
|
||||
search_builder.add_facet_filters(FacetFilter::from_str(facet_filters, &schema, &attrs)?);
|
||||
}
|
||||
|
||||
if let Some(facets) = ¶ms.facets_distribution {
|
||||
|
Reference in New Issue
Block a user