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

[Backport 1.x] Add regexp interval source #2069

Merged
merged 1 commit into from
Feb 16, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 8, 2022

Backport b9420d8 from #1917

* Add regexp interval source

Add a regexp interval source provider so people can use regular
expressions inside of intervals queries.

Signed-off-by: Matt Weber <matt@mattweber.org>

* Fixes

- register regexp interval in SearchModule
- use fully-qualified name for lucene RegExp
- get rid of unnecessary variable

Signed-off-by: Matt Weber <matt@mattweber.org>
(cherry picked from commit b9420d8)
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@dblock
Copy link
Member

dblock commented Feb 8, 2022

@mattweber are you saying this will need serialization checks on top of? bcw tests?

@mattweber
Copy link
Contributor

@dblock yes this needs a few or the bwc tests will fail. With this merged, I can do PR for the proper checks.

}

public Regexp(StreamInput in) throws IOException {
this.pattern = in.readString();
Copy link
Contributor

Choose a reason for hiding this comment

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

Need version checks >= 1.3

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mattweber do you think you need it? the 1.3.0+ would recognize case "regexp" but older clusters would not, so we should not see the case when older cluster tries to reconstruct Regexp from the stream

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea I am not sure, usually I do the checks for an existing feature not a new one. Maybe we just go as is and see if we start triggering any BWC failures. In which case I can do a followup PR for version checks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 It should be fine I think


@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(pattern);
Copy link
Contributor

Choose a reason for hiding this comment

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

Version checks >= 1.3

@mattweber
Copy link
Contributor

Will also need to add the same checks to main once it gets merged. They were not needed initially because this is a completely new feature.

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 82d8cfa
Log 2289

Reports 2289

@mattweber
Copy link
Contributor

@reta can you please look at this? Now that I think of it I am not sure what the correct way to handle this is since it is a completely new feature and with a version check the entire Regexp(StreamInput in) constructor would be empty. Maybe I need to do that then set pattern to null and in getSource return a NoMatchIntervalsSource with an error message when we have a null pattern.

@mattweber
Copy link
Contributor

@dblock I think we can merge this without any checks (see above comments). If any bwc checks start to fail I will open a follow-up PR to address it. Thank you!

@mattweber
Copy link
Contributor

@dblock is this ok to be merged or would you like me to make some changes?

@dblock
Copy link
Member

dblock commented Feb 14, 2022

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 82d8cfa
Log 2379

Reports 2379

@dblock
Copy link
Member

dblock commented Feb 14, 2022

@mattweber For gradle check failures, check the log please, open/update existing issues for any new/known failures and I or any other admin can kick it again.

@dblock
Copy link
Member

dblock commented Feb 14, 2022

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 82d8cfa
Log 2382

Reports 2382

@dblock
Copy link
Member

dblock commented Feb 14, 2022

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 82d8cfa
Log 2384

Reports 2384

@dblock
Copy link
Member

dblock commented Feb 14, 2022

... http://vault.centos.org/centos/ is having issues

@dblock
Copy link
Member

dblock commented Feb 14, 2022

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 82d8cfa
Log 2387

Reports 2387

@dblock
Copy link
Member

dblock commented Feb 14, 2022

#1957

@dblock
Copy link
Member

dblock commented Feb 14, 2022

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 82d8cfa
Log 2390

Reports 2390

@mattweber
Copy link
Contributor

@dblock can you merge please?

@dblock dblock merged commit bfe128c into 1.x Feb 16, 2022
@github-actions github-actions bot deleted the backport/backport-1917-to-1.x branch February 16, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants