mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
add facet count in response
This commit is contained in:
parent
f1ac76a283
commit
7c7f753463
3 changed files with 13 additions and 3 deletions
|
@ -249,6 +249,7 @@ impl<'a> SearchBuilder<'a> {
|
|||
processing_time_ms: time_ms,
|
||||
query: self.query.to_string(),
|
||||
facets_distribution: search_result.facets,
|
||||
exhaustive_facets_count: search_result.exhaustive_facets_count,
|
||||
};
|
||||
|
||||
Ok(results)
|
||||
|
@ -335,6 +336,8 @@ pub struct SearchResult {
|
|||
pub query: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub facets_distribution: Option<HashMap<String, HashMap<String, usize>>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub exhaustive_facets_count: Option<bool>,
|
||||
}
|
||||
|
||||
/// returns the start index and the length on the crop.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue