mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-22 19:27:27 +01:00
Skip evaluating when a universe is empty, nothing can be found
This commit is contained in:
parent
a6f3a01c6a
commit
7967e93c16
@ -343,6 +343,10 @@ impl<'a> Filter<'a> {
|
||||
filterable_fields: &HashSet<String>,
|
||||
universe: Option<&RoaringBitmap>,
|
||||
) -> Result<RoaringBitmap> {
|
||||
if universe.map_or(false, |u| u.is_empty()) {
|
||||
return Ok(RoaringBitmap::new());
|
||||
}
|
||||
|
||||
match &self.condition {
|
||||
FilterCondition::Not(f) => {
|
||||
// TODO improve the documents_ids to also support intersections at deserialize time.
|
||||
|
Loading…
x
Reference in New Issue
Block a user