-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Restore support for the include/pattern
syntax.
#23140
Conversation
@markharwood Would you mind reviewing this PR? |
Just tried this regex which works OK:
.. but this equivalent syntax fails to parse:
|
Thanks @markharwood I should have been more surprised that tests passed on the first time that I ran them, I probably ran gradle from the wrong directory, tests were completely broken! :) I just pushed a new commit that should fix it. |
@@ -120,6 +121,9 @@ public static IncludeExclude parseInclude(XContentParser parser, QueryParseConte | |||
"Unknown parameter in Include/Exclude clause: " + currentFieldName); | |||
} | |||
} | |||
if (pattern != null) { | |||
return new IncludeExclude(pattern, null); |
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.
Maybe throw an exception here if partition criteria supplied?
Partitioning not supported when using regex-based filtering.
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.
good point
@markharwood Can you give it another look? |
LGTM |
Closes #22933