mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 00:34:26 +01:00
Fix tests after simplification of NOT filter
This commit is contained in:
parent
cc7415bb31
commit
90a304cb07
@ -371,10 +371,10 @@ pub mod tests {
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
"NOT channel = ponce",
|
"NOT channel = ponce",
|
||||||
Fc::Condition {
|
Fc::Not(Box::new(Fc::Condition {
|
||||||
fid: rtok("NOT ", "channel"),
|
fid: rtok("NOT ", "channel"),
|
||||||
op: Condition::NotEqual(rtok("NOT channel = ", "ponce")),
|
op: Condition::Equal(rtok("NOT channel = ", "ponce")),
|
||||||
},
|
})),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"subscribers < 1000",
|
"subscribers < 1000",
|
||||||
@ -406,31 +406,31 @@ pub mod tests {
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
"NOT subscribers < 1000",
|
"NOT subscribers < 1000",
|
||||||
Fc::Condition {
|
Fc::Not(Box::new(Fc::Condition {
|
||||||
fid: rtok("NOT ", "subscribers"),
|
fid: rtok("NOT ", "subscribers"),
|
||||||
op: Condition::GreaterThanOrEqual(rtok("NOT subscribers < ", "1000")),
|
op: Condition::LowerThan(rtok("NOT subscribers < ", "1000")),
|
||||||
},
|
})),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"NOT subscribers > 1000",
|
"NOT subscribers > 1000",
|
||||||
Fc::Condition {
|
Fc::Not(Box::new(Fc::Condition {
|
||||||
fid: rtok("NOT ", "subscribers"),
|
fid: rtok("NOT ", "subscribers"),
|
||||||
op: Condition::LowerThanOrEqual(rtok("NOT subscribers > ", "1000")),
|
op: Condition::GreaterThan(rtok("NOT subscribers > ", "1000")),
|
||||||
},
|
})),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"NOT subscribers <= 1000",
|
"NOT subscribers <= 1000",
|
||||||
Fc::Condition {
|
Fc::Not(Box::new(Fc::Condition {
|
||||||
fid: rtok("NOT ", "subscribers"),
|
fid: rtok("NOT ", "subscribers"),
|
||||||
op: Condition::GreaterThan(rtok("NOT subscribers <= ", "1000")),
|
op: Condition::LowerThanOrEqual(rtok("NOT subscribers <= ", "1000")),
|
||||||
},
|
})),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"NOT subscribers >= 1000",
|
"NOT subscribers >= 1000",
|
||||||
Fc::Condition {
|
Fc::Not(Box::new(Fc::Condition {
|
||||||
fid: rtok("NOT ", "subscribers"),
|
fid: rtok("NOT ", "subscribers"),
|
||||||
op: Condition::LowerThan(rtok("NOT subscribers >= ", "1000")),
|
op: Condition::GreaterThanOrEqual(rtok("NOT subscribers >= ", "1000")),
|
||||||
},
|
})),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"subscribers EXISTS",
|
"subscribers EXISTS",
|
||||||
@ -455,10 +455,10 @@ pub mod tests {
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
"NOT subscribers NOT EXISTS",
|
"NOT subscribers NOT EXISTS",
|
||||||
Fc::Condition {
|
Fc::Not(Box::new(Fc::Not(Box::new(Fc::Condition {
|
||||||
fid: rtok("NOT ", "subscribers"),
|
fid: rtok("NOT ", "subscribers"),
|
||||||
op: Condition::Exists,
|
op: Condition::Exists,
|
||||||
},
|
})))),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"subscribers NOT EXISTS",
|
"subscribers NOT EXISTS",
|
||||||
@ -479,18 +479,13 @@ pub mod tests {
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
"NOT subscribers 100 TO 1000",
|
"NOT subscribers 100 TO 1000",
|
||||||
Fc::Or(
|
Fc::Not(Box::new(Fc::Condition {
|
||||||
vec![Fc::Condition {
|
fid: rtok("NOT ", "subscribers"),
|
||||||
fid: rtok("NOT ", "subscribers"),
|
op: Condition::Between {
|
||||||
op: Condition::LowerThan(rtok("NOT subscribers ", "100")),
|
from: rtok("NOT subscribers ", "100"),
|
||||||
}
|
to: rtok("NOT subscribers 100 TO ", "1000"),
|
||||||
.into(),
|
},
|
||||||
Fc::Condition {
|
})),
|
||||||
fid: rtok("NOT ", "subscribers"),
|
|
||||||
op: Condition::GreaterThan(rtok("NOT subscribers 100 TO ", "1000")),
|
|
||||||
}
|
|
||||||
.into()],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"_geoRadius(12, 13, 14)",
|
"_geoRadius(12, 13, 14)",
|
||||||
|
Loading…
Reference in New Issue
Block a user