Skip to content

Commit 3048dae

Browse files
committed
Merge branch 'main' of github.com:elastic/elasticsearch into additional-migration-info-for-ds-reindex
2 parents 2727b1b + 8793248 commit 3048dae

File tree

69 files changed

+2589
-444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2589
-444
lines changed

docs/changelog/117581.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 117581
2+
summary: Make reserved built-in roles queryable
3+
area: Authorization
4+
type: enhancement
5+
issues: []

modules/percolator/src/main/java/org/elasticsearch/percolator/PercolateQueryBuilder.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
4444
import org.elasticsearch.common.io.stream.StreamInput;
4545
import org.elasticsearch.common.io.stream.StreamOutput;
46-
import org.elasticsearch.common.logging.DeprecationLogger;
4746
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
4847
import org.elasticsearch.common.xcontent.XContentHelper;
4948
import org.elasticsearch.index.IndexVersion;
@@ -80,28 +79,19 @@
8079
import java.util.Collections;
8180
import java.util.List;
8281
import java.util.Objects;
83-
import java.util.function.BiConsumer;
8482
import java.util.function.Supplier;
8583

8684
import static org.elasticsearch.search.SearchService.ALLOW_EXPENSIVE_QUERIES;
8785
import static org.elasticsearch.xcontent.ConstructingObjectParser.constructorArg;
8886
import static org.elasticsearch.xcontent.ConstructingObjectParser.optionalConstructorArg;
8987

9088
public class PercolateQueryBuilder extends AbstractQueryBuilder<PercolateQueryBuilder> {
91-
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(ParseField.class);
92-
static final String DOCUMENT_TYPE_DEPRECATION_MESSAGE = "[types removal] Types are deprecated in [percolate] queries. "
93-
+ "The [document_type] should no longer be specified.";
94-
static final String TYPE_DEPRECATION_MESSAGE = "[types removal] Types are deprecated in [percolate] queries. "
95-
+ "The [type] of the indexed document should no longer be specified.";
96-
9789
public static final String NAME = "percolate";
9890

9991
static final ParseField DOCUMENT_FIELD = new ParseField("document");
10092
static final ParseField DOCUMENTS_FIELD = new ParseField("documents");
10193
private static final ParseField NAME_FIELD = new ParseField("name");
10294
private static final ParseField QUERY_FIELD = new ParseField("field");
103-
private static final ParseField DOCUMENT_TYPE_FIELD = new ParseField("document_type");
104-
private static final ParseField INDEXED_DOCUMENT_FIELD_TYPE = new ParseField("type");
10595
private static final ParseField INDEXED_DOCUMENT_FIELD_INDEX = new ParseField("index");
10696
private static final ParseField INDEXED_DOCUMENT_FIELD_ID = new ParseField("id");
10797
private static final ParseField INDEXED_DOCUMENT_FIELD_ROUTING = new ParseField("routing");
@@ -368,10 +358,6 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
368358
);
369359
}
370360

371-
private static BiConsumer<PercolateQueryBuilder, String> deprecateAndIgnoreType(String key, String message) {
372-
return (target, type) -> deprecationLogger.compatibleCritical(key, message);
373-
}
374-
375361
private static BytesReference parseDocument(XContentParser parser) throws IOException {
376362
try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
377363
builder.copyCurrentStructure(parser);

muted-tests.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ tests:
4040
- class: org.elasticsearch.packaging.test.WindowsServiceTests
4141
method: test33JavaChanged
4242
issue: https://github.com/elastic/elasticsearch/issues/113177
43-
- class: org.elasticsearch.smoketest.MlWithSecurityIT
44-
method: test {yaml=ml/sparse_vector_search/Test sparse_vector search with query vector and pruning config}
45-
issue: https://github.com/elastic/elasticsearch/issues/108997
4643
- class: org.elasticsearch.packaging.test.WindowsServiceTests
4744
method: test80JavaOptsInEnvVar
4845
issue: https://github.com/elastic/elasticsearch/issues/113219
@@ -159,9 +156,6 @@ tests:
159156
issue: https://github.com/elastic/elasticsearch/issues/117473
160157
- class: org.elasticsearch.repositories.s3.RepositoryS3EcsClientYamlTestSuiteIT
161158
issue: https://github.com/elastic/elasticsearch/issues/117525
162-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
163-
method: test {p0=synonyms/90_synonyms_reloading_for_synset/Reload analyzers for specific synonym set}
164-
issue: https://github.com/elastic/elasticsearch/issues/116777
165159
- class: "org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT"
166160
method: "test {scoring.*}"
167161
issue: https://github.com/elastic/elasticsearch/issues/117641
@@ -302,6 +296,14 @@ tests:
302296
- class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests
303297
method: testInvalidJSON
304298
issue: https://github.com/elastic/elasticsearch/issues/116521
299+
- class: org.elasticsearch.xpack.ccr.rest.ShardChangesRestIT
300+
method: testShardChangesNoOperation
301+
issue: https://github.com/elastic/elasticsearch/issues/118800
302+
- class: org.elasticsearch.xpack.security.QueryableReservedRolesIT
303+
method: testDeletingAndCreatingSecurityIndexTriggersSynchronization
304+
issue: https://github.com/elastic/elasticsearch/issues/118806
305+
- class: org.elasticsearch.xpack.esql.session.IndexResolverFieldNamesTests
306+
issue: https://github.com/elastic/elasticsearch/issues/118814
305307

306308
# Examples:
307309
#

rest-api-spec/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task ->
6969
task.skipTest("search/520_fetch_fields/fetch _seq_no via fields", "error code is changed from 5xx to 400 in 9.0")
7070
task.skipTest("search.vectors/41_knn_search_bbq_hnsw/Test knn search", "Scoring has changed in latest versions")
7171
task.skipTest("search.vectors/42_knn_search_bbq_flat/Test knn search", "Scoring has changed in latest versions")
72+
task.skipTest("synonyms/90_synonyms_reloading_for_synset/Reload analyzers for specific synonym set", "Can't work until auto-expand replicas is 0-1 for synonyms index")
7273
})

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
---
2-
"Reload analyzers for specific synonym set":
1+
setup:
32
- requires:
43
cluster_features: ["gte_v8.10.0"]
54
reason: Reloading analyzers for specific synonym set is introduced in 8.10.0
5+
66
# Create synonyms_set1
77
- do:
88
synonyms.put_synonym:
@@ -100,21 +100,25 @@
100100
- '{"index": {"_index": "my_index2", "_id": "2"}}'
101101
- '{"my_field": "goodbye"}'
102102

103-
# An update of synonyms_set1 must trigger auto-reloading of analyzers only for synonyms_set1
103+
---
104+
"Reload analyzers for specific synonym set":
105+
# These specific tests can't succeed in BwC, as synonyms auto-expand replicas are 0-all. Replicas can't be associated to
106+
# upgraded nodes, and thus we are not able to guarantee that the shards are not failed.
107+
# This test is skipped for BwC until synonyms index has auto-exapnd replicas set to 0-1.
108+
104109
- do:
105110
synonyms.put_synonym:
106111
id: synonyms_set1
107112
body:
108113
synonyms_set:
109114
- synonyms: "hello, salute"
110115
- synonyms: "ciao => goodbye"
116+
111117
- match: { result: "updated" }
112118
- gt: { reload_analyzers_details._shards.total: 0 }
113119
- gt: { reload_analyzers_details._shards.successful: 0 }
114120
- match: { reload_analyzers_details._shards.failed: 0 }
115-
- length: { reload_analyzers_details.reload_details: 1 } # reload details contain only a single index
116-
- match: { reload_analyzers_details.reload_details.0.index: "my_index1" }
117-
- match: { reload_analyzers_details.reload_details.0.reloaded_analyzers.0: "my_analyzer1" }
121+
118122

119123
# Confirm that the index analyzers are reloaded for my_index1
120124
- do:
@@ -127,6 +131,23 @@
127131
query: salute
128132
- match: { hits.total.value: 1 }
129133

134+
---
135+
"Check analyzer reloaded and non failed shards for bwc tests":
136+
137+
- do:
138+
synonyms.put_synonym:
139+
id: synonyms_set1
140+
body:
141+
synonyms_set:
142+
- synonyms: "hello, salute"
143+
- synonyms: "ciao => goodbye"
144+
- match: { result: "updated" }
145+
- gt: { reload_analyzers_details._shards.total: 0 }
146+
- gt: { reload_analyzers_details._shards.successful: 0 }
147+
- length: { reload_analyzers_details.reload_details: 1 } # reload details contain only a single index
148+
- match: { reload_analyzers_details.reload_details.0.index: "my_index1" }
149+
- match: { reload_analyzers_details.reload_details.0.reloaded_analyzers.0: "my_analyzer1" }
150+
130151
# Confirm that the index analyzers are still the same for my_index2
131152
- do:
132153
search:

test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ protected static void wipeAllIndices(boolean preserveSecurityIndices) throws IOE
11381138
}
11391139
}
11401140

1141-
private static boolean ignoreSystemIndexAccessWarnings(List<String> warnings) {
1141+
protected static boolean ignoreSystemIndexAccessWarnings(List<String> warnings) {
11421142
for (String warning : warnings) {
11431143
if (warning.startsWith("this request accesses system indices:")) {
11441144
SUITE_LOGGER.warn("Ignoring system index access warning during test cleanup: {}", warning);

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/ParsingException.java

Lines changed: 0 additions & 56 deletions
This file was deleted.

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/planner/ExpressionTranslators.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.elasticsearch.xpack.esql.core.expression.Expression;
1212
import org.elasticsearch.xpack.esql.core.expression.FieldAttribute;
1313
import org.elasticsearch.xpack.esql.core.expression.MetadataAttribute;
14-
import org.elasticsearch.xpack.esql.core.expression.predicate.fulltext.MultiMatchQueryPredicate;
1514
import org.elasticsearch.xpack.esql.core.expression.predicate.logical.And;
1615
import org.elasticsearch.xpack.esql.core.expression.predicate.logical.Not;
1716
import org.elasticsearch.xpack.esql.core.expression.predicate.logical.Or;
@@ -22,7 +21,6 @@
2221
import org.elasticsearch.xpack.esql.core.expression.predicate.regex.WildcardLike;
2322
import org.elasticsearch.xpack.esql.core.querydsl.query.BoolQuery;
2423
import org.elasticsearch.xpack.esql.core.querydsl.query.ExistsQuery;
25-
import org.elasticsearch.xpack.esql.core.querydsl.query.MultiMatchQuery;
2624
import org.elasticsearch.xpack.esql.core.querydsl.query.NotQuery;
2725
import org.elasticsearch.xpack.esql.core.querydsl.query.Query;
2826
import org.elasticsearch.xpack.esql.core.querydsl.query.RegexQuery;
@@ -71,18 +69,6 @@ private static Query translateField(RegexMatch e, String targetFieldName) {
7169
}
7270
}
7371

74-
public static class MultiMatches extends ExpressionTranslator<MultiMatchQueryPredicate> {
75-
76-
@Override
77-
protected Query asQuery(MultiMatchQueryPredicate q, TranslatorHandler handler) {
78-
return doTranslate(q, handler);
79-
}
80-
81-
public static Query doTranslate(MultiMatchQueryPredicate q, TranslatorHandler handler) {
82-
return new MultiMatchQuery(q.source(), q.query(), q.fields(), q);
83-
}
84-
}
85-
8672
public static class BinaryLogic extends ExpressionTranslator<
8773
org.elasticsearch.xpack.esql.core.expression.predicate.logical.BinaryLogic> {
8874

x-pack/plugin/esql/qa/server/mixed-cluster/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/mixed/MixedClusterEsqlSpecIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.util.List;
2222

2323
import static org.elasticsearch.xpack.esql.CsvTestUtils.isEnabled;
24-
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_LOOKUP_V5;
24+
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_LOOKUP_V6;
2525
import static org.elasticsearch.xpack.esql.qa.rest.EsqlSpecTestCase.Mode.ASYNC;
2626

2727
public class MixedClusterEsqlSpecIT extends EsqlSpecTestCase {
@@ -96,7 +96,7 @@ protected boolean supportsInferenceTestService() {
9696

9797
@Override
9898
protected boolean supportsIndexModeLookup() throws IOException {
99-
return hasCapabilities(List.of(JOIN_LOOKUP_V5.capabilityName()));
99+
return hasCapabilities(List.of(JOIN_LOOKUP_V6.capabilityName()));
100100
}
101101

102102
@Override

x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/MultiClusterSpecIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
import static org.elasticsearch.xpack.esql.EsqlTestUtils.classpathResources;
4949
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.INLINESTATS;
5050
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.INLINESTATS_V2;
51-
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_LOOKUP_V5;
51+
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_LOOKUP_V6;
5252
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_PLANNING_V1;
5353
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.METADATA_FIELDS_REMOTE_TEST;
5454
import static org.elasticsearch.xpack.esql.qa.rest.EsqlSpecTestCase.Mode.SYNC;
@@ -124,7 +124,7 @@ protected void shouldSkipTest(String testName) throws IOException {
124124
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(INLINESTATS.capabilityName()));
125125
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(INLINESTATS_V2.capabilityName()));
126126
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(JOIN_PLANNING_V1.capabilityName()));
127-
assumeFalse("LOOKUP JOIN not yet supported in CCS", testCase.requiredCapabilities.contains(JOIN_LOOKUP_V5.capabilityName()));
127+
assumeFalse("LOOKUP JOIN not yet supported in CCS", testCase.requiredCapabilities.contains(JOIN_LOOKUP_V6.capabilityName()));
128128
}
129129

130130
private TestFeatureService remoteFeaturesService() throws IOException {
@@ -283,8 +283,8 @@ protected boolean supportsInferenceTestService() {
283283

284284
@Override
285285
protected boolean supportsIndexModeLookup() throws IOException {
286-
// CCS does not yet support JOIN_LOOKUP_V5 and clusters falsely report they have this capability
287-
// return hasCapabilities(List.of(JOIN_LOOKUP_V5.capabilityName()));
286+
// CCS does not yet support JOIN_LOOKUP_V6 and clusters falsely report they have this capability
287+
// return hasCapabilities(List.of(JOIN_LOOKUP_V6.capabilityName()));
288288
return false;
289289
}
290290
}

0 commit comments

Comments
 (0)