mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Make AND+OR filters n-ary (store a vector of subfilters instead of 2)
NOTE: The token_at_depth is method is a bit useless now, as the only cases where there would be a toke at depth 1000 are the cases where the parser already stack-overflowed earlier. Example: (((((... (x=1) ...)))))
This commit is contained in:
parent
f55034ed54
commit
258c3dd563
3 changed files with 118 additions and 110 deletions
|
@ -745,10 +745,9 @@ async fn main() -> anyhow::Result<()> {
|
|||
};
|
||||
|
||||
let condition = match (filters, facet_filters) {
|
||||
(Some(filters), Some(facet_filters)) => Some(FilterCondition::And(
|
||||
Box::new(filters.into()),
|
||||
Box::new(facet_filters.into()),
|
||||
)),
|
||||
(Some(filters), Some(facet_filters)) => {
|
||||
Some(FilterCondition::And(vec![filters.into(), facet_filters.into()]))
|
||||
}
|
||||
(Some(condition), None) | (None, Some(condition)) => Some(condition.into()),
|
||||
_otherwise => None,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue