mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-11-03 09:26:29 +00:00
improve the error messages and add tests for the filters
This commit is contained in:
@@ -8,6 +8,8 @@ char = _{ !(PEEK | "\\") ~ ANY
|
||||
| "\\" ~ (PEEK | "\\" | "/" | "b" | "f" | "n" | "r" | "t")
|
||||
| "\\" ~ ("u" ~ ASCII_HEX_DIGIT{4})}
|
||||
|
||||
// we deliberately choose to allow empty parameters to generate more specific error message later
|
||||
parameters ={"(" ~ (value ~ ",")* ~ value? ~ ")"}
|
||||
condition = _{between | eq | greater | less | geq | leq | neq}
|
||||
between = {key ~ value ~ "TO" ~ value}
|
||||
geq = {key ~ ">=" ~ value}
|
||||
@@ -16,7 +18,7 @@ neq = {key ~ "!=" ~ value}
|
||||
eq = {key ~ "=" ~ value}
|
||||
greater = {key ~ ">" ~ value}
|
||||
less = {key ~ "<" ~ value}
|
||||
geo_radius = {"_geoRadius(" ~ value ~ "," ~ value ~ "," ~ value ~ ")"}
|
||||
geo_radius = {"_geoRadius" ~ parameters }
|
||||
|
||||
prgm = {SOI ~ expr ~ EOI}
|
||||
expr = _{ ( term ~ (operation ~ term)* ) }
|
||||
|
||||
Reference in New Issue
Block a user