-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for exists query syntax in query parser #2170
Conversation
query-grammar/src/user_input_ast.rs
Outdated
@@ -16,6 +16,9 @@ pub enum UserInputLeaf { | |||
field: Option<String>, | |||
elements: Vec<String>, | |||
}, | |||
Exists { | |||
field: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the reason for the Option
here.
Can you add a comment explaining the meaning of Exists { field: None }
and when it can be built?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is just an intermediary state that should never make it out to the world. I've changed so it's always a String, which can temporarily be empty
query-grammar/src/query_grammar.rs
Outdated
@@ -300,10 +300,42 @@ fn term_group_infallible(i: &str) -> JResult<&str, UserInputAst> { | |||
} | |||
} | |||
|
|||
fn exists(i: &str) -> IResult<&str, UserInputLeaf> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we stop the one char variable? If it is i
for input, let's at least go for inp
Codecov ReportPatch coverage:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2170 +/- ##
==========================================
+ Coverage 94.39% 94.41% +0.02%
==========================================
Files 321 322 +1
Lines 62821 63159 +338
==========================================
+ Hits 59299 59634 +335
- Misses 3522 3525 +3
☔ View full report in Codecov by Sentry. |
tantivy side of quickwit-oss/quickwit#3714