feat: support inclusive numeric ranges in Lucene filters and field groups#976
Open
kaya-david wants to merge 8 commits into
Open
feat: support inclusive numeric ranges in Lucene filters and field groups#976kaya-david wants to merge 8 commits into
kaya-david wants to merge 8 commits into
Conversation
10331bf to
6f1c006
Compare
Pablu23
reviewed
Jun 19, 2026
Pablu23
left a comment
Collaborator
There was a problem hiding this comment.
Looks good so far, had a few questions and notes
Comment on lines
+338
to
+345
| expression = str(expr) | ||
| lower_token, upper_token = expr.children | ||
|
|
||
| if not expression.startswith("[") or not expression.endswith("]"): | ||
| raise LuceneFilterError( | ||
| f'The expression "{expression}" is invalid. ' | ||
| "Only inclusive ranges using square brackets are supported." | ||
| ) |
Collaborator
There was a problem hiding this comment.
This seems, overengineered, does expression not expose this in a nicer way?
| lower_bound_float = float(lower_value) | ||
| upper_bound_float = float(upper_value) | ||
| except ValueError as error: | ||
| raise LuceneFilterError(f'The expression "{expression}" is invalid!') from error |
Collaborator
There was a problem hiding this comment.
We do want string ranges, so timestamps of ISO 8601 Format, are possible
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.
Description
Assignee
Documentation
Code Quality
How did you verify that the changes work in practice?
Reviewer
The rendered docs for this PR can be found here.