From 6fb8af423c50f06b93ad7aa3f014c316ec8d9dd2 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Wed, 7 Jun 2023 11:20:46 +0200 Subject: [PATCH] Rename the hits and query output into facetHits and facetQuery respectively --- meilisearch/src/search.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/meilisearch/src/search.rs b/meilisearch/src/search.rs index 8a29f091d..bebf80084 100644 --- a/meilisearch/src/search.rs +++ b/meilisearch/src/search.rs @@ -284,8 +284,8 @@ pub struct FacetStats { #[derive(Serialize, Debug, Clone, PartialEq)] #[serde(rename_all = "camelCase")] pub struct FacetSearchResult { - pub hits: Vec, - pub query: Option, + pub facet_hits: Vec, + pub facet_query: Option, pub processing_time_ms: u128, } @@ -596,11 +596,9 @@ pub fn perform_facet_search( facet_search.query(facet_query); } - let hits = facet_search.execute()?; - Ok(FacetSearchResult { - hits, - query: facet_query, + facet_hits: facet_search.execute()?, + facet_query, processing_time_ms: before_search.elapsed().as_millis(), }) }