mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
Improve test
This commit is contained in:
parent
1088248546
commit
153168c847
@ -1698,6 +1698,8 @@ mod tests {
|
|||||||
|
|
||||||
let colour_id = index.fields_ids_map(&rtxn).unwrap().id("colour").unwrap();
|
let colour_id = index.fields_ids_map(&rtxn).unwrap().id("colour").unwrap();
|
||||||
let colour_green_id = index.fields_ids_map(&rtxn).unwrap().id("colour.green").unwrap();
|
let colour_green_id = index.fields_ids_map(&rtxn).unwrap().id("colour.green").unwrap();
|
||||||
|
let colour_green_blue_id =
|
||||||
|
index.fields_ids_map(&rtxn).unwrap().id("colour.green.blue").unwrap();
|
||||||
|
|
||||||
let bitmap_colour =
|
let bitmap_colour =
|
||||||
index.facet_id_exists_docids.get(&rtxn, &colour_id).unwrap().unwrap();
|
index.facet_id_exists_docids.get(&rtxn, &colour_id).unwrap().unwrap();
|
||||||
@ -1706,6 +1708,10 @@ mod tests {
|
|||||||
let bitmap_colour_green =
|
let bitmap_colour_green =
|
||||||
index.facet_id_exists_docids.get(&rtxn, &colour_green_id).unwrap().unwrap();
|
index.facet_id_exists_docids.get(&rtxn, &colour_green_id).unwrap().unwrap();
|
||||||
assert_eq!(bitmap_colour_green.into_iter().collect::<Vec<_>>(), vec![6, 7]);
|
assert_eq!(bitmap_colour_green.into_iter().collect::<Vec<_>>(), vec![6, 7]);
|
||||||
|
|
||||||
|
let bitmap_colour_blue =
|
||||||
|
index.facet_id_exists_docids.get(&rtxn, &colour_green_blue_id).unwrap().unwrap();
|
||||||
|
assert_eq!(bitmap_colour_blue.into_iter().collect::<Vec<_>>(), vec![7]);
|
||||||
};
|
};
|
||||||
|
|
||||||
let faceted_fields = hashset!(S("colour"));
|
let faceted_fields = hashset!(S("colour"));
|
||||||
|
Loading…
Reference in New Issue
Block a user