Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ stage('Configure') {
new LocalElasticsearchBuildEnvironment(version: '8.18.7', condition: TestCondition.ON_DEMAND),
new LocalElasticsearchBuildEnvironment(version: '8.19.4', condition: TestCondition.AFTER_MERGE),
new LocalElasticsearchBuildEnvironment(version: '9.0.7', condition: TestCondition.ON_DEMAND),
new LocalElasticsearchBuildEnvironment(version: '9.1.5', condition: TestCondition.BEFORE_MERGE, isDefault: true),
new LocalElasticsearchBuildEnvironment(version: '9.1.5', condition: TestCondition.ON_DEMAND),
new LocalElasticsearchBuildEnvironment(version: '9.2.0', condition: TestCondition.BEFORE_MERGE, isDefault: true),
// IMPORTANT: Make sure to update the documentation for any newly supported Elasticsearch versions
// See version.org.elasticsearch.compatible.expected.text
// and version.org.elasticsearch.compatible.regularly-tested.text in POMs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ else if ( minor == 0 ) {
}

private ElasticsearchProtocolDialect createProtocolDialectElasticV9(ElasticsearchVersion version, int minor) {
if ( minor > 1 ) {
if ( minor > 2 ) {
VersionLog.INSTANCE.unknownElasticsearchVersion( version );
}
return new Elasticsearch81ProtocolDialect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,18 @@ public static List<? extends Arguments> params() {
ElasticsearchDistributionName.ELASTIC, "9.1.0", "9.1.0",
Elasticsearch814ModelDialect.class, Elasticsearch81ProtocolDialect.class
),
successWithWarning(
success(
ElasticsearchDistributionName.ELASTIC, "9.2", "9.2.0",
Elasticsearch814ModelDialect.class, Elasticsearch81ProtocolDialect.class
),
success(
ElasticsearchDistributionName.ELASTIC, "9.2.0", "9.2.0",
Elasticsearch814ModelDialect.class, Elasticsearch81ProtocolDialect.class
),
successWithWarning(
ElasticsearchDistributionName.ELASTIC, "9.3.0", "9.3.0",
Elasticsearch814ModelDialect.class, Elasticsearch81ProtocolDialect.class
),
success(
ElasticsearchDistributionName.OPENSEARCH, "1", "1.3.1",
OpenSearch1ModelDialect.class, Elasticsearch70ProtocolDialect.class
Expand Down
2 changes: 1 addition & 1 deletion bom/platform-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<!-- These versions will be checked against the ones resolved by Maven for the project in the enforcer rule -->
<version.bom.org.hibernate.orm>7.1.2.Final</version.bom.org.hibernate.orm>
<version.bom.org.elasticsearch.client>9.1.5</version.bom.org.elasticsearch.client>
<version.bom.org.elasticsearch.client>9.2.0</version.bom.org.elasticsearch.client>
<version.bom.software.amazon.awssdk>2.35.7</version.bom.software.amazon.awssdk>
<version.bom.io.smallrye>3.3.1</version.bom.io.smallrye>
<version.bom.org.jboss.logging.processor>3.0.4.Final</version.bom.org.jboss.logging.processor>
Expand Down
2 changes: 1 addition & 1 deletion build/container/search-backend/elastic.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# * update `version.org.elasticsearch.latest` property in a POM file.
# * update the tags for 'elasticsearch-current' and 'elasticsearch-next' builds in ci/dependency-update/Jenkinsfile
#
FROM docker.io/elastic/elasticsearch:9.1.5
FROM docker.io/elastic/elasticsearch:9.2.0
4 changes: 2 additions & 2 deletions build/parents/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<!-- >>> Elasticsearch -->
<!-- The version of the Elasticsearch client used by Hibernate Search, independently of the version of the remote cluster -->
<!-- Use the latest open-source version here. Currently, low-level clients are open-source even in 8.5+ -->
<version.org.elasticsearch.client>9.1.5</version.org.elasticsearch.client>
<version.org.elasticsearch.client>9.2.0</version.org.elasticsearch.client>
<!-- Various HTTP client versions that our own Elasticsearch client implementations depend on -->
<version.org.apache.httpcomponents.httpclient>4.5.14</version.org.apache.httpcomponents.httpclient>
<version.org.apache.httpcomponents.httpcore>4.4.16</version.org.apache.httpcomponents.httpcore>
Expand All @@ -61,7 +61,7 @@
<!-- The versions of Elasticsearch advertised as compatible with Hibernate Search -->
<!-- Make sure to only mention tested versions here -->
<!-- Make sure that 7.10 stays explicitly mentioned here, because that's the last open-source version -->
<version.org.elasticsearch.compatible.regularly-tested.text>7.10, 7.17, 8.18 or 9.1</version.org.elasticsearch.compatible.regularly-tested.text>
<version.org.elasticsearch.compatible.regularly-tested.text>7.10, 7.17, 8.18 or 9.2</version.org.elasticsearch.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.adoc`. -->
Expand Down
4 changes: 2 additions & 2 deletions ci/dependency-update/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Map settings() {
updateProperties: [],
onlyRunTestDependingOn: ['hibernate-search-backend-elasticsearch'],
// We want to use the snapshot version of an image from the ES registry since that's where they are publishing their snapshots.
additionalMavenArgs: '-Dtest.lucene.skip=true -Dtest.elasticsearch.run.elastic.image.name=docker.elastic.co/elasticsearch/elasticsearch -Dtest.elasticsearch.run.elastic.image.tag=9.1.6-SNAPSHOT',
additionalMavenArgs: '-Dtest.lucene.skip=true -Dtest.elasticsearch.run.elastic.image.name=docker.elastic.co/elasticsearch/elasticsearch -Dtest.elasticsearch.run.elastic.image.tag=9.2.1-SNAPSHOT',
// This job won't change the versions in the pom. We are passing the latest Elasticsearch version through an additional maven argument `-D`
skipSourceModifiedCheck: true
]
Expand All @@ -65,7 +65,7 @@ Map settings() {
updateProperties: [],
onlyRunTestDependingOn: ['hibernate-search-backend-elasticsearch'],
// We want to use the snapshot version of an image from the ES registry since that's where they are publishing their snapshots.
additionalMavenArgs: '-Dtest.lucene.skip=true -Dtest.elasticsearch.run.elastic.image.name=docker.elastic.co/elasticsearch/elasticsearch -Dtest.elasticsearch.run.elastic.image.tag=9.2.0-SNAPSHOT',
additionalMavenArgs: '-Dtest.lucene.skip=true -Dtest.elasticsearch.run.elastic.image.name=docker.elastic.co/elasticsearch/elasticsearch -Dtest.elasticsearch.run.elastic.image.tag=9.3.0-SNAPSHOT',
// This job won't change the versions in the pom. We are passing the latest Elasticsearch version through an additional maven argument `-D`
skipSourceModifiedCheck: true
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
import org.hibernate.search.engine.search.projection.ProjectionCollector;
import org.hibernate.search.engine.spatial.GeoPoint;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.BigDecimalFieldTypeDescriptor;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.ByteVectorFieldTypeDescriptor;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.FloatFieldTypeDescriptor;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.FloatVectorFieldTypeDescriptor;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.GeoPointFieldTypeDescriptor;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.InstantFieldTypeDescriptor;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.LocalDateFieldTypeDescriptor;
Expand Down Expand Up @@ -94,6 +96,17 @@ public boolean nonCanonicalRangeInAggregations() {
return false;
}

public boolean projectionPreservesNulls(FieldTypeDescriptor<?, ?> fieldType) {
if ( ByteVectorFieldTypeDescriptor.INSTANCE.equals( fieldType )
|| FloatVectorFieldTypeDescriptor.INSTANCE.equals( fieldType ) ) {
return isActualVersion(
esVersion -> esVersion.isLessThan( "9.2.0" ),
osVersion -> true
);
}
return projectionPreservesNulls();
}

@Override
public boolean fieldsProjectableByDefault() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void multi(TestedFieldStructure fieldStructure,
Collections.singletonList( dataSet.getFieldValue( 2 ) ),
Collections.singletonList( dataSet.getFieldValue( 3 ) ),
// Empty document
TckConfiguration.get().getBackendFeatures().projectionPreservesNulls()
TckConfiguration.get().getBackendFeatures().projectionPreservesNulls( fieldType )
? Collections.singletonList( null )
: Collections.emptyList()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public boolean projectionPreservesNulls() {
return true;
}

public boolean projectionPreservesNulls(FieldTypeDescriptor<?, ?> fieldType) {
return projectionPreservesNulls();
}

public abstract boolean fieldsProjectableByDefault();

public boolean supportsTotalHitsThresholdForScroll() {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@

<!-- Container images for various integration tests -->
<!-- The latest version of Elasticsearch tested against by default -->
<version.org.elasticsearch.latest>9.1.5</version.org.elasticsearch.latest>
<version.org.elasticsearch.latest>9.2.0</version.org.elasticsearch.latest>
<test.elasticsearch.version></test.elasticsearch.version>
<test.elasticsearch.distribution>elastic</test.elasticsearch.distribution>

Expand Down