mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-24 23:31:02 +00:00
Skip evaluating when a universe is empty, nothing can be found
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user