mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 00:34:26 +01:00
Re-order the operator
Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
parent
519d6b2bf3
commit
bff48681d2
@ -46,12 +46,12 @@ pub fn parse_condition(input: Span) -> IResult<FilterCondition> {
|
|||||||
let (input, (fid, op, value)) = tuple((parse_value, operator, cut(parse_value)))(input)?;
|
let (input, (fid, op, value)) = tuple((parse_value, operator, cut(parse_value)))(input)?;
|
||||||
|
|
||||||
let condition = match *op.fragment() {
|
let condition = match *op.fragment() {
|
||||||
"=" => FilterCondition::Condition { fid, op: Equal(value) },
|
|
||||||
"!=" => FilterCondition::Condition { fid, op: NotEqual(value) },
|
|
||||||
">" => FilterCondition::Condition { fid, op: GreaterThan(value) },
|
|
||||||
"<" => FilterCondition::Condition { fid, op: LowerThan(value) },
|
|
||||||
"<=" => FilterCondition::Condition { fid, op: LowerThanOrEqual(value) },
|
"<=" => FilterCondition::Condition { fid, op: LowerThanOrEqual(value) },
|
||||||
">=" => FilterCondition::Condition { fid, op: GreaterThanOrEqual(value) },
|
">=" => FilterCondition::Condition { fid, op: GreaterThanOrEqual(value) },
|
||||||
|
"!=" => FilterCondition::Condition { fid, op: NotEqual(value) },
|
||||||
|
"<" => FilterCondition::Condition { fid, op: LowerThan(value) },
|
||||||
|
">" => FilterCondition::Condition { fid, op: GreaterThan(value) },
|
||||||
|
"=" => FilterCondition::Condition { fid, op: Equal(value) },
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user