mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Skip evaluating when a universe is empty, nothing can be found
This commit is contained in:
parent
a6f3a01c6a
commit
7967e93c16
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue