mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-11 22:14:32 +01:00
Reimplement !=
filter to select all docids not selected by =
This commit is contained in:
parent
258c3dd563
commit
01675771d5
@ -309,11 +309,12 @@ impl<'a> Filter<'a> {
|
|||||||
return Ok(string_docids | number_docids);
|
return Ok(string_docids | number_docids);
|
||||||
}
|
}
|
||||||
Condition::NotEqual(val) => {
|
Condition::NotEqual(val) => {
|
||||||
let all_numbers_ids = index.number_faceted_documents_ids(rtxn, field_id)?;
|
|
||||||
let all_strings_ids = index.string_faceted_documents_ids(rtxn, field_id)?;
|
|
||||||
let operator = Condition::Equal(val.clone());
|
let operator = Condition::Equal(val.clone());
|
||||||
let docids = Self::evaluate_operator(rtxn, index, field_id, &operator)?;
|
let docids = Self::evaluate_operator(
|
||||||
return Ok((all_numbers_ids | all_strings_ids) - docids);
|
rtxn, index, field_id, &operator,
|
||||||
|
)?;
|
||||||
|
let all_ids = index.documents_ids(rtxn)?;
|
||||||
|
return Ok(all_ids - docids);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user