Skip to content

Add getMinimalSupportedVersion to QueryBuilders #83208

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

Merged

Conversation

cbuescher
Copy link
Member

Supporting #81809, we changed query builders to implement 'VersionedNamedWriteable' to be able to detect
when new query builders under the search enpoint are introduced and also to force new implementations to overwrite
'getMinimalSupportedVersion' with a current release version.
This change removes the default implementation in the QueryBuilder interface and replaces it with individual
implementations in the currently existing query builders. For builders that have been around for longer than 7.0 (the
earliest verison constant we currently have around) we use Version.V_EMPTY which sorts always before any other declared version.

@cbuescher cbuescher added >non-issue :Search/Search Search-related issues that do not fall into other categories v8.1.0 labels Jan 27, 2022
@cbuescher cbuescher requested a review from javanna January 27, 2022 14:31
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jan 27, 2022
@elasticmachine
Copy link
Collaborator

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

@@ -127,6 +128,11 @@ public String getWriteableName() {
return NAME;
}

@Override
public Version getMinimalSupportedVersion() {
return Version.V_EMPTY;
Copy link
Member

Choose a reason for hiding this comment

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

not too sure when this was introduced. I am thinking during the 7.x series.

Copy link
Member Author

Choose a reason for hiding this comment

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

This query builder looks like something used only in tests though, I didn't give those a thorough check.

@cbuescher
Copy link
Member Author

@elasticmachine run elasticsearch-ci/part-1

@mark-vieira mark-vieira added v8.2.0 and removed v8.1.0 labels Feb 2, 2022
@cbuescher cbuescher merged commit 5536884 into elastic:master Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants