Fix not equal filter when field contains both number and strings

This commit is contained in:
Dmytro Gordon 2022-06-27 15:55:17 +03:00
parent 83ad1aaf05
commit 3ff03a3f5f
3 changed files with 13 additions and 7 deletions

View file

@ -306,12 +306,7 @@ impl<'a> Filter<'a> {
return Ok(string_docids | number_docids);
}
Condition::NotEqual(val) => {
let number = val.parse::<f64>().ok();
let all_numbers_ids = if number.is_some() {
index.number_faceted_documents_ids(rtxn, field_id)?
} else {
RoaringBitmap::new()
};
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 docids = Self::evaluate_operator(