update tests for facets distribution case

This commit is contained in:
mpostma 2020-06-26 12:59:46 +02:00
parent 18a50b4dac
commit afacdbc7a0
6 changed files with 75 additions and 67 deletions

View file

@ -636,7 +636,7 @@ pub fn placeholder_document_sort(
}
/// For each entry in facet_docids, calculates the number of documents in the intersection with candidate_docids.
fn facet_count(
pub fn facet_count(
facet_docids: HashMap<String, HashMap<String, (&str, Cow<Set<DocumentId>>)>>,
candidate_docids: &Set<DocumentId>,
) -> HashMap<String, HashMap<String, usize>> {

View file

@ -204,7 +204,7 @@ impl<'c, 'f, 'd, 'i> QueryBuilder<'c, 'f, 'd, 'i> {
}
}
fn facet_count_docids<'a>(&self, reader: &'a MainReader) -> MResult<Option<HashMap<String, HashMap<String, Cow<'a, Set<DocumentId>>>>>> {
fn facet_count_docids<'a>(&self, reader: &'a MainReader) -> MResult<Option<HashMap<String, HashMap<String, (&'a str, Cow<'a, Set<DocumentId>>)>>>> {
match self.facets {
Some(ref field_ids) => {
let mut facet_count_map = HashMap::new();