mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 14:54:27 +01:00
Rename the hits and query output into facetHits and facetQuery respectively
This commit is contained in:
parent
cb0bb399fa
commit
6fb8af423c
@ -284,8 +284,8 @@ pub struct FacetStats {
|
|||||||
#[derive(Serialize, Debug, Clone, PartialEq)]
|
#[derive(Serialize, Debug, Clone, PartialEq)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct FacetSearchResult {
|
pub struct FacetSearchResult {
|
||||||
pub hits: Vec<FacetValueHit>,
|
pub facet_hits: Vec<FacetValueHit>,
|
||||||
pub query: Option<String>,
|
pub facet_query: Option<String>,
|
||||||
pub processing_time_ms: u128,
|
pub processing_time_ms: u128,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,11 +596,9 @@ pub fn perform_facet_search(
|
|||||||
facet_search.query(facet_query);
|
facet_search.query(facet_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
let hits = facet_search.execute()?;
|
|
||||||
|
|
||||||
Ok(FacetSearchResult {
|
Ok(FacetSearchResult {
|
||||||
hits,
|
facet_hits: facet_search.execute()?,
|
||||||
query: facet_query,
|
facet_query,
|
||||||
processing_time_ms: before_search.elapsed().as_millis(),
|
processing_time_ms: before_search.elapsed().as_millis(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user