mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
Don't recompute filterable fields in evaluation of IN[] filter
This commit is contained in:
parent
98f0da6b38
commit
c51dcad51b
@ -361,10 +361,7 @@ impl<'a> Filter<'a> {
|
|||||||
return Ok(all_ids - selected);
|
return Ok(all_ids - selected);
|
||||||
}
|
}
|
||||||
FilterCondition::In { fid, els } => {
|
FilterCondition::In { fid, els } => {
|
||||||
// TODO: this could be optimised
|
if crate::is_faceted(fid.value(), filterable_fields) {
|
||||||
let filterable_fields = index.filterable_fields(rtxn)?;
|
|
||||||
|
|
||||||
if crate::is_faceted(fid.value(), &filterable_fields) {
|
|
||||||
let field_ids_map = index.fields_ids_map(rtxn)?;
|
let field_ids_map = index.fields_ids_map(rtxn)?;
|
||||||
|
|
||||||
if let Some(fid) = field_ids_map.id(fid.value()) {
|
if let Some(fid) = field_ids_map.id(fid.value()) {
|
||||||
@ -382,7 +379,7 @@ impl<'a> Filter<'a> {
|
|||||||
} else {
|
} else {
|
||||||
return Err(fid.as_external_error(FilterError::AttributeNotFilterable {
|
return Err(fid.as_external_error(FilterError::AttributeNotFilterable {
|
||||||
attribute: fid.value(),
|
attribute: fid.value(),
|
||||||
filterable_fields,
|
filterable_fields: filterable_fields.clone(),
|
||||||
}))?;
|
}))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user