Skip to content
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 invalid flag setting for RegExp #61976

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Sep 4, 2020

This test failure is a side effect of the upgrade to a new Lucene snapshot

relates #61957

@iverase iverase added :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI v8.0.0 labels Sep 4, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Sep 4, 2020
@@ -59,7 +59,7 @@ protected StringScriptFieldRegexpQuery mutate(StringScriptFieldRegexpQuery orig)
pattern += "modified";
break;
case 3:
flags = randomValueOtherThan(flags, () -> randomInt(0xFFFF));
flags = randomValueOtherThan(flags, () -> randomInt(RegExp.ALL));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the change is ok but I wonder why that failed the test. We're supposed to rewrite the old all transparently.
@markharwood can you check that the leniency is applied correctly ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a change that was not in the current form: apache/lucene-solr#1659

@nik9000
Copy link
Member

nik9000 commented Sep 4, 2020 via email

@iverase
Copy link
Contributor Author

iverase commented Sep 4, 2020

Thanks @nik9000 , that makes sense. When adding case insensitivity, the check for the flag range was added.

@iverase iverase merged commit f37727a into elastic:master Sep 4, 2020
@iverase iverase deleted the fixInvalidFlagSetting branch September 4, 2020 11:45
@markharwood
Copy link
Contributor

LGTM- The change from OxFFFF to OxFF (RegExp.ALL) is what I would expect a well-behaved client to do now.
I'll need to look deeper into what the (lack of) leniency for bad flags was going on here.

Related - I'm poking around in the scripted stuff just now as part of a more general case insensitivity PR for term/terms/prefix.
In that PR I note that AbstractScriptMappedFieldType deviated from my intended changes to the base class (adding a case insensitive flag to term/terms/wildcard/prefix query) because it declares the old method signature but is missing the override annotation. I can clean up in my PR or leave it a separate issue?

@nik9000
Copy link
Member

nik9000 commented Sep 4, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team >test-failure Triaged test failures from CI v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants