mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-02-02 16:43:34 +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>,
|
filterable_fields: &HashSet<String>,
|
||||||
universe: Option<&RoaringBitmap>,
|
universe: Option<&RoaringBitmap>,
|
||||||
) -> Result<RoaringBitmap> {
|
) -> Result<RoaringBitmap> {
|
||||||
|
if universe.map_or(false, |u| u.is_empty()) {
|
||||||
|
return Ok(RoaringBitmap::new());
|
||||||
|
}
|
||||||
|
|
||||||
match &self.condition {
|
match &self.condition {
|
||||||
FilterCondition::Not(f) => {
|
FilterCondition::Not(f) => {
|
||||||
// TODO improve the documents_ids to also support intersections at deserialize time.
|
// TODO improve the documents_ids to also support intersections at deserialize time.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user