federated queries: adjust error message

This commit is contained in:
Louis Dureuil 2024-09-17 10:08:21 +02:00
parent 6732dd95d7
commit dc8a662209
No known key found for this signature in database
3 changed files with 14 additions and 9 deletions

View file

@ -455,9 +455,8 @@ impl SearchQueryWithIndex {
}
}
pub fn has_facets(&self) -> bool {
let Some(facets) = &self.facets else { return false };
!facets.is_empty()
pub fn has_facets(&self) -> Option<&[String]> {
self.facets.as_deref().filter(|v| !v.is_empty())
}
pub fn into_index_query_federation(self) -> (IndexUid, SearchQuery, Option<FederationOptions>) {