Skip to content

Commit

Permalink
HSEARCH-5245 Add compatibility with OpenSearch 2.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Sep 18, 2024
1 parent 0767e58 commit 82918e2
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ stage('Configure') {
new LocalOpenSearchBuildEnvironment(version: '2.13.0', condition: TestCondition.ON_DEMAND),
new LocalOpenSearchBuildEnvironment(version: '2.14.0', condition: TestCondition.ON_DEMAND),
new LocalOpenSearchBuildEnvironment(version: '2.15.0', condition: TestCondition.ON_DEMAND),
new LocalOpenSearchBuildEnvironment(version: '2.16.0', condition: TestCondition.BEFORE_MERGE),
new LocalOpenSearchBuildEnvironment(version: '2.16.0', condition: TestCondition.ON_DEMAND),
new LocalOpenSearchBuildEnvironment(version: '2.17.0', condition: TestCondition.BEFORE_MERGE),
// See https://opensearch.org/lines/2x.html for a list of all 2.x versions
// IMPORTANT: Make sure to update the documentation for any newly supported OpenSearch versions
// See version.org.opensearch.compatible.expected.text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private ElasticsearchProtocolDialect createProtocolDialectOpenSearchV1(Elasticse
}

private ElasticsearchProtocolDialect createProtocolDialectOpenSearchV2(ElasticsearchVersion version, int minor) {
if ( minor > 16 ) {
if ( minor > 17 ) {
log.unknownElasticsearchVersion( version );
}
return new Elasticsearch70ProtocolDialect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,22 @@ public static List<? extends Arguments> params() {
ElasticsearchDistributionName.OPENSEARCH, "2.16.0", "2.16.0",
OpenSearch214ModelDialect.class, Elasticsearch70ProtocolDialect.class
),
successWithWarning(
success(
ElasticsearchDistributionName.OPENSEARCH, "2.17", "2.17.0",
OpenSearch214ModelDialect.class, Elasticsearch70ProtocolDialect.class
),
successWithWarning(
success(
ElasticsearchDistributionName.OPENSEARCH, "2.17.0", "2.17.0",
OpenSearch214ModelDialect.class, Elasticsearch70ProtocolDialect.class
),
successWithWarning(
ElasticsearchDistributionName.OPENSEARCH, "2.18", "2.18.0",
OpenSearch214ModelDialect.class, Elasticsearch70ProtocolDialect.class
),
successWithWarning(
ElasticsearchDistributionName.OPENSEARCH, "2.18.0", "2.18.0",
OpenSearch214ModelDialect.class, Elasticsearch70ProtocolDialect.class
),
successWithWarning(
ElasticsearchDistributionName.OPENSEARCH, "3", "3.0.0",
OpenSearch214ModelDialect.class, Elasticsearch70ProtocolDialect.class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# IMPORTANT! When updating the version of OpenSearch in this Dockerfile,
# make sure to update `version.org.opensearch.latest` property in a POM file,
# and to update the version in opensearch.Dockerfile as well.
FROM docker.io/opensearchproject/opensearch:2.16.0
FROM docker.io/opensearchproject/opensearch:2.17.0
2 changes: 1 addition & 1 deletion build/container/search-backend/opensearch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# IMPORTANT! When updating the version of OpenSearch in this Dockerfile,
# make sure to update `version.org.opensearch.latest` property in a POM file,
# and to update the version in amazon-opensearch-serverless.Dockerfile as well.
FROM docker.io/opensearchproject/opensearch:2.16.0
FROM docker.io/opensearchproject/opensearch:2.17.0
4 changes: 2 additions & 2 deletions build/parents/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
-->
<!-- The versions of OpenSearch advertised as compatible with Hibernate Search -->
<!-- Make sure to only mention tested versions here -->
<version.org.opensearch.compatible.regularly-tested.text>1.3 or 2.16</version.org.opensearch.compatible.regularly-tested.text>
<version.org.opensearch.compatible.regularly-tested.text>1.3 or 2.17</version.org.opensearch.compatible.regularly-tested.text>
<!-- These are the versions same as above, but pointing only to the major part (used in compatibility section of ES backend documentation
as versions that Hibernate Search is compatible with. -->
<!-- NOTE: Adding new major versions would require to update the compatibility table in `backend-elasticsearch-compatibility` section of `backend-elasticsearch.asciidoc`. -->
<version.org.opensearch.compatible.expected.text>1.3 or 2.x</version.org.opensearch.compatible.expected.text>
<!-- The latest version of OpenSearch tested against by default -->
<version.org.opensearch.latest>2.16.0</version.org.opensearch.latest>
<version.org.opensearch.latest>2.17.0</version.org.opensearch.latest>
<!-- The main compatible version of OpenSearch, advertised by default. Used in documentation links. -->
<version.org.opensearch.compatible.main>${version.org.opensearch.latest}</version.org.opensearch.compatible.main>
<documentation.org.opensearch.url>https://opensearch.org/docs/${parsed-version.org.opensearch.compatible.main.majorVersion}.${parsed-version.org.opensearch.compatible.main.minorVersion}</documentation.org.opensearch.url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public boolean rangeAggregationsDoNotIgnoreQuery() {
// leading to routes, being ignored and incorrect counts produced in the results:
return isActualVersion(
es -> true,
os -> os.isLessThan( "2.16.0" ),
os -> !os.isMatching( "2.16.0" ),
aoss -> false
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ void searchFaceted() {
|| isActualVersion(
es -> true,
// See https://github.com/opensearch-project/OpenSearch/issues/15169
os -> os.isLessThan( "2.16.0" ),
os -> !os.isMatching( "2.16.0" ),
aoss -> false
)
);
Expand Down

0 comments on commit 82918e2

Please sign in to comment.