Rename the hits and query output into facetHits and facetQuery respectively

This commit is contained in:
Kerollmops 2023-06-07 11:20:46 +02:00 committed by Louis Dureuil
parent cb0bb399fa
commit 6fb8af423c
No known key found for this signature in database

View File

@ -284,8 +284,8 @@ pub struct FacetStats {
#[derive(Serialize, Debug, Clone, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct FacetSearchResult {
pub hits: Vec<FacetValueHit>,
pub query: Option<String>,
pub facet_hits: Vec<FacetValueHit>,
pub facet_query: Option<String>,
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(),
})
}