mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
add error on search with empty facets
This commit is contained in:
parent
18b56c6af8
commit
2ada9c5d72
3 changed files with 7 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue