mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-26 22:50:07 +01:00
Add exhaustiveFacetsCount
This commit is contained in:
parent
adb970edcc
commit
00b0a00fc5
@ -74,6 +74,8 @@ pub struct SearchResult {
|
||||
pub processing_time_ms: u128,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub facets_distribution: Option<BTreeMap<String, BTreeMap<String, u64>>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub exhaustive_facets_count: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
@ -211,6 +213,11 @@ impl Index {
|
||||
None => None,
|
||||
};
|
||||
|
||||
let exhaustive_facets_count = match facets_distribution {
|
||||
Some(_) => Some(false), // not implemented yet
|
||||
None => None
|
||||
};
|
||||
|
||||
let result = SearchResult {
|
||||
exhaustive_nb_hits: false, // not implemented yet
|
||||
hits: documents,
|
||||
@ -220,6 +227,7 @@ impl Index {
|
||||
offset: query.offset.unwrap_or_default(),
|
||||
processing_time_ms: before_search.elapsed().as_millis(),
|
||||
facets_distribution,
|
||||
exhaustive_facets_count,
|
||||
};
|
||||
Ok(result)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user