-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix bug regex parentheses #744
Conversation
|
||
assert lucene_filter == RegExFilterExpression(["regex_key_one"], ".*value.*") | ||
|
||
def test_creates_lucene_compliance_filter_parentheses_or(self): |
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.
Additionally, tests for 'regex_key: (/.*value_one.*/ OR /.*value_two.*/)'
and 'mixed_key: (/.*value_one.*/ OR "/.*value_two.*/")'
would be good.
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.
Added 'regex_key: (/.*value_one.*/ OR /.*value_two.*/)'
.
Altered 'regex_key_one:(/.*value.*./ OR key_two: "/.*value.*/")'
to 'regex_key_one: (/.*value_one.*/ OR /.*value_two.*/)'
.
Are more nested parentheses structures necessary?
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.
... no conflict raised here:
lucene_filter = LuceneFilter.create('regex_key_one: (/.*value_one.*/ OR "/.*value_two.*/")') assert lucene_filter == Or( RegExFilterExpression(["regex_key_one"], ".*value_one.*"), StringFilterExpression(["regex_key_one"], "/.*value_two.*/"), )
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.
Added
'regex_key: (/.*value_one.*/ OR /.*value_two.*/)'
. Altered'regex_key_one:(/.*value.*./ OR key_two: "/.*value.*/")'
to'regex_key_one: (/.*value_one.*/ OR /.*value_two.*/)'
.Are more nested parentheses structures necessary?
Thank you! In my opinion those tests are enough, but I'm not against having more tests.
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.
... no conflict raised here:
lucene_filter = LuceneFilter.create('regex_key_one: (/.*value_one.*/ OR "/.*value_two.*/")') assert lucene_filter == Or( RegExFilterExpression(["regex_key_one"], ".*value_one.*"), StringFilterExpression(["regex_key_one"], "/.*value_two.*/"), )
Sorry, it was a mistake. I have edited it out a while ago.
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.
Thank you for the fix!
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.
please add an entry in the CHANGELOG.md file for this bugfix
No description provided.