Skip to content
Open
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
5 changes: 3 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ stage('Configure') {
new LocalElasticsearchBuildEnvironment(version: '8.18.7', condition: TestCondition.ON_DEMAND),
new LocalElasticsearchBuildEnvironment(version: '8.19.6', condition: TestCondition.AFTER_MERGE),
new LocalElasticsearchBuildEnvironment(version: '9.0.7', condition: TestCondition.ON_DEMAND),
new LocalElasticsearchBuildEnvironment(version: '9.1.5', condition: TestCondition.ON_DEMAND),
new LocalElasticsearchBuildEnvironment(version: '9.2.4', condition: TestCondition.BEFORE_MERGE, isDefault: true),
new LocalElasticsearchBuildEnvironment(version: '9.1.5', condition: TestCondition.ON_DEMAND),
new LocalElasticsearchBuildEnvironment(version: '9.2.4', condition: TestCondition.ON_DEMAND),
new LocalElasticsearchBuildEnvironment(version: '9.3.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 > 2 ) {
if ( minor > 3 ) {
VersionLog.INSTANCE.unknownElasticsearchVersion( version );
}
return new Elasticsearch81ProtocolDialect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,18 @@ public static List<? extends Arguments> params() {
ElasticsearchDistributionName.ELASTIC, "9.2.0", "9.2.0",
Elasticsearch814ModelDialect.class, Elasticsearch81ProtocolDialect.class
),
successWithWarning(
success(
ElasticsearchDistributionName.ELASTIC, "9.3", "9.3.0",
Elasticsearch814ModelDialect.class, Elasticsearch81ProtocolDialect.class
),
success(
ElasticsearchDistributionName.ELASTIC, "9.3.0", "9.3.0",
Elasticsearch814ModelDialect.class, Elasticsearch81ProtocolDialect.class
),
successWithWarning(
ElasticsearchDistributionName.ELASTIC, "9.4.0", "9.4.0",
Elasticsearch814ModelDialect.class, Elasticsearch81ProtocolDialect.class
),
success(
ElasticsearchDistributionName.OPENSEARCH, "1", "1.3.1",
OpenSearch1ModelDialect.class, Elasticsearch70ProtocolDialect.class
Expand Down
4 changes: 2 additions & 2 deletions bom/platform-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

<!-- These versions will be checked against the ones resolved by Maven for the project in the enforcer rule -->
<version.bom.org.hibernate.orm>7.3.0.CR2</version.bom.org.hibernate.orm>
<version.bom.org.elasticsearch.client>9.2.4</version.bom.org.elasticsearch.client>
<version.bom.org.elasticsearch.java.client>9.2.4</version.bom.org.elasticsearch.java.client>
<version.bom.org.elasticsearch.client>9.3.0</version.bom.org.elasticsearch.client>
<version.bom.org.elasticsearch.java.client>9.3.0</version.bom.org.elasticsearch.java.client>
<version.bom.org.opensearch.client>3.4.0</version.bom.org.opensearch.client>
<version.bom.software.amazon.awssdk>2.41.2</version.bom.software.amazon.awssdk>
<version.bom.io.smallrye>3.3.2</version.bom.io.smallrye>
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.2.4
FROM docker.io/elastic/elasticsearch:9.3.0
6 changes: 3 additions & 3 deletions build/parents/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<!-- >>> 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.2.4</version.org.elasticsearch.client>
<version.org.elasticsearch.java.client>9.2.4</version.org.elasticsearch.java.client>
<version.org.elasticsearch.client>9.3.0</version.org.elasticsearch.client>
<version.org.elasticsearch.java.client>9.3.0</version.org.elasticsearch.java.client>
<version.org.opensearch.client>3.4.0</version.org.opensearch.client>
<!-- Various HTTP client versions that our own Elasticsearch client implementations depend on -->
<version.org.apache.httpcomponents.client5>5.5.1</version.org.apache.httpcomponents.client5>
Expand All @@ -65,7 +65,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.2</version.org.elasticsearch.compatible.regularly-tested.text>
<version.org.elasticsearch.compatible.regularly-tested.text>7.10, 7.17, 8.18 or 9.3</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.2.5-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.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.3.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.4.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 @@ -568,4 +568,16 @@ public <T> T aggregatedSumNullValue(Class<T> clazz) {
}
return super.aggregatedSumNullValue( clazz );
}

@Override
public boolean canHandleDeepNestedPredicate(FieldTypeDescriptor<?, ?> fieldTypeDescriptor) {
if ( ByteVectorFieldTypeDescriptor.INSTANCE.equals( fieldTypeDescriptor ) ) {
return isActualVersion(
es -> !es.isMatching( "9.3.0" ),
os -> true,
aoss -> true
);
}
return super.canHandleDeepNestedPredicate( fieldTypeDescriptor );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package org.hibernate.search.integrationtest.backend.tck.search.predicate;

import static org.hibernate.search.util.impl.integrationtest.common.assertion.SearchResultAssert.assertThatQuery;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

import java.util.Collection;

Expand Down Expand Up @@ -82,6 +83,7 @@ void nestedX1_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
void nestedX2_explicit(SimpleMappedIndex<IndexBinding> mainIndex,
SimpleMappedIndex<MissingFieldIndexBinding> missingFieldIndex,
AbstractPredicateDataSet dataSet) {
assumeTrue( canHandleDeepNestedPredicate( dataSet ) );
assertThatQuery( mainIndex.query()
.where( f -> f.nested( mainIndex.binding().nested.absolutePath )
.add( f.nested( mainIndex.binding().nested.nested.absolutePath )
Expand All @@ -95,6 +97,7 @@ void nestedX2_explicit(SimpleMappedIndex<IndexBinding> mainIndex,
void nestedX2_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
SimpleMappedIndex<MissingFieldIndexBinding> missingFieldIndex,
AbstractPredicateDataSet dataSet) {
assumeTrue( canHandleDeepNestedPredicate( dataSet ) );
assertThatQuery( mainIndex.query()
.where( f -> predicate( f, mainIndex.binding().nested.nested, 0, dataSet ) )
.routing( dataSet.routingKey ) )
Expand All @@ -106,6 +109,7 @@ void nestedX2_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
void nestedX2_explicit_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
SimpleMappedIndex<MissingFieldIndexBinding> missingFieldIndex,
AbstractPredicateDataSet dataSet) {
assumeTrue( canHandleDeepNestedPredicate( dataSet ) );
assertThatQuery( mainIndex.query()
.where( f -> f.nested( mainIndex.binding().nested.absolutePath )
.add( predicate( f, mainIndex.binding().nested.nested, 0, dataSet ) ) )
Expand All @@ -118,6 +122,7 @@ void nestedX2_explicit_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
void nestedX3_explicitX2_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
SimpleMappedIndex<MissingFieldIndexBinding> missingFieldIndex,
AbstractPredicateDataSet dataSet) {
assumeTrue( canHandleDeepNestedPredicate( dataSet ) );
assertThatQuery( mainIndex.query()
.where( f -> f.nested( mainIndex.binding().nested.absolutePath )
.add( f.nested( mainIndex.binding().nested.nested.absolutePath )
Expand All @@ -131,6 +136,7 @@ void nestedX3_explicitX2_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
void nestedX3_explicit_implicitX2(SimpleMappedIndex<IndexBinding> mainIndex,
SimpleMappedIndex<MissingFieldIndexBinding> missingFieldIndex,
AbstractPredicateDataSet dataSet) {
assumeTrue( canHandleDeepNestedPredicate( dataSet ) );
assertThatQuery( mainIndex.query()
.where( f -> f.nested( mainIndex.binding().nested.absolutePath )
.add( predicate( f, mainIndex.binding().nested.nested.nested, 0, dataSet ) ) )
Expand All @@ -143,6 +149,7 @@ void nestedX3_explicit_implicitX2(SimpleMappedIndex<IndexBinding> mainIndex,
void nestedFlattenedNested_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
SimpleMappedIndex<MissingFieldIndexBinding> missingFieldIndex,
AbstractPredicateDataSet dataSet) {
assumeTrue( canHandleDeepNestedPredicate( dataSet ) );
assertThatQuery( mainIndex.query()
.where( f -> predicate( f, mainIndex.binding().nested.flattened.nested, 0, dataSet ) )
.routing( dataSet.routingKey ) )
Expand All @@ -159,6 +166,7 @@ void nestedFlattenedNested_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
void multiIndex_missingNestedField_implicit(SimpleMappedIndex<IndexBinding> mainIndex,
SimpleMappedIndex<MissingFieldIndexBinding> missingFieldIndex,
AbstractPredicateDataSet dataSet) {
assumeTrue( canHandleDeepNestedPredicate( dataSet ) );
StubMappingScope scope = mainIndex.createScope( missingFieldIndex );

// The "nested" predicate should not match anything in missingFieldIndex
Expand All @@ -183,6 +191,10 @@ void multiIndex_missingNestedField_implicit(SimpleMappedIndex<IndexBinding> main
protected abstract PredicateFinalStep predicate(SearchPredicateFactory f, ObjectFieldBinding objectFieldBinding,
int matchingDocOrdinal, AbstractPredicateDataSet dataSet);

protected boolean canHandleDeepNestedPredicate(AbstractPredicateDataSet dataSet) {
return true;
}

abstract static class AbstractObjectBinding {
final String absolutePath;
final SimpleFieldModelsByType field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ protected PredicateFinalStep predicate(SearchPredicateFactory f, String fieldPat
return knnPredicateOptionsStep( f, fieldPath, matchingDocOrdinal,
dataSet.values.matchingArg( matchingDocOrdinal ) );
}

@Override
protected boolean canHandleDeepNestedPredicate(AbstractPredicateDataSet dataSet) {
return TckConfiguration.get().getBackendFeatures()
.canHandleDeepNestedPredicate( ( (DataSet<?, ?>) dataSet ).fieldType );
}
}

@Nested
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,8 @@ public <U, R> R accumulatedNullValue(ProjectionCollector.Provider<U, R> collecto
public <T> T aggregatedSumNullValue(Class<T> clazz) {
return null;
}

public boolean canHandleDeepNestedPredicate(FieldTypeDescriptor<?, ?> fieldTypeDescriptor) {
return true;
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@

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

Expand Down