feat: Add support for Exists leaf in query parser#2798
Open
Darkheir wants to merge 2 commits into
Open
Conversation
Signed-off-by: Darkheir <raphael.cohen@sekoia.io>
xingtanzjr
reviewed
Jan 15, 2026
| @@ -159,6 +162,7 @@ impl fmt::Debug for LogicalLiteral { | |||
| ref pattern, | |||
| ref field, | |||
| } => write!(formatter, "Regex({field:?}, {pattern:?})"), | |||
| LogicalLiteral::Exists { ref field } => write!(formatter, "exists:{field}"), | |||
Contributor
There was a problem hiding this comment.
That may be ambuigous if we put operator exists before :. For example, if user gives this query
'exists:title'
it may be treated as something like finding title term in feild exists.
Contributor
Author
There was a problem hiding this comment.
Fair enough, I updated the PR to follow the same syntax as for regexes.
Contributor
Maybe we can add some description here |
Signed-off-by: Darkheir <raphael.cohen@sekoia.io>
Contributor
Author
Added a small description, but there is not much to say :-) |
xingtanzjr
approved these changes
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A while ago the Exists syntax was added to the query grammar: #2170.
It was never added to the query parser and this PR aims to implement this part.