SearchQueriesWithIndex changes

This commit is contained in:
Louis Dureuil 2024-09-12 17:48:26 +02:00
parent 57f9517a98
commit 7c084b1286
No known key found for this signature in database

View File

@ -441,9 +441,6 @@ pub struct SearchQueryWithIndex {
}
impl SearchQueryWithIndex {
pub fn has_federation_options(&self) -> bool {
self.federation_options.is_some()
}
pub fn has_pagination(&self) -> Option<&'static str> {
if self.offset.is_some() {
Some("offset")
@ -458,6 +455,11 @@ impl SearchQueryWithIndex {
}
}
pub fn has_facets(&self) -> bool {
let Some(facets) = &self.facets else { return false };
!facets.is_empty()
}
pub fn into_index_query_federation(self) -> (IndexUid, SearchQuery, Option<FederationOptions>) {
let SearchQueryWithIndex {
index_uid,