Skip to content

Commit 1fac8fb

Browse files
authored
Merge branch 'main' into enh/mapping_pre_processor2
2 parents daddb62 + eee6973 commit 1fac8fb

File tree

37 files changed

+1485
-49
lines changed

37 files changed

+1485
-49
lines changed

docs/changelog/117176.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 117176
2+
summary: Integrate IBM watsonx to Inference API for re-ranking task
3+
area: Experiences
4+
type: enhancement
5+
issues: []

docs/changelog/121109.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 121109
2+
summary: Fix propagation of dynamic mapping parameter when applying `copy_to`
3+
area: Mapping
4+
type: bug
5+
issues:
6+
- 113049

docs/changelog/121325.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 121325
2+
summary: '`ReindexDataStreamIndex` bug in assertion caused by reference equality'
3+
area: Data streams
4+
type: bug
5+
issues: []

docs/src/yamlRestTest/java/org/elasticsearch/smoketest/DocsClientYamlTestSuiteIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ protected boolean isWatcherTest() {
286286

287287
/**
288288
* Compares the results of running two analyzers against many random
289-
* strings. The goal is to figure out if two anlayzers are "the same" by
289+
* strings. The goal is to figure out if two analyzers are "the same" by
290290
* comparing their results. This is far from perfect but should be fairly
291291
* accurate, especially for gross things like missing {@code decimal_digit}
292292
* token filters, and should be fairly fast because it compares a fairly

muted-tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,6 @@ tests:
359359
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
360360
method: test {yaml=indices.get_alias/10_basic/Get aliases via /*/_alias/}
361361
issue: https://github.com/elastic/elasticsearch/issues/121290
362-
- class: org.elasticsearch.xpack.inference.action.TransportInferenceActionTests
363-
method: testRerouting_HandlesTransportException_FromOtherNode
364-
issue: https://github.com/elastic/elasticsearch/issues/121292
365-
- class: org.elasticsearch.xpack.inference.action.TransportInferenceActionTests
366-
method: testRerouting_ToOtherNode
367-
issue: https://github.com/elastic/elasticsearch/issues/121293
368362
- class: org.elasticsearch.xpack.inference.common.InferenceServiceNodeLocalRateLimitCalculatorTests
369363
issue: https://github.com/elastic/elasticsearch/issues/121294
370364
- class: org.elasticsearch.env.NodeEnvironmentTests
@@ -379,6 +373,18 @@ tests:
379373
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
380374
method: test {yaml=reference/rest-api/common-options/line_125}
381375
issue: https://github.com/elastic/elasticsearch/issues/121338
376+
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
377+
method: test {yaml=reference/snapshot-restore/apis/get-snapshot-api/line_751}
378+
issue: https://github.com/elastic/elasticsearch/issues/121345
379+
- class: org.elasticsearch.xpack.security.profile.ProfileIntegTests
380+
method: testHasPrivileges
381+
issue: https://github.com/elastic/elasticsearch/issues/121346
382+
- class: org.elasticsearch.xpack.security.profile.ProfileIntegTests
383+
method: testActivateProfile
384+
issue: https://github.com/elastic/elasticsearch/issues/121151
385+
- class: org.elasticsearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT
386+
method: test {yaml=search.vectors/42_knn_search_int4_flat/Vector similarity with filter only}
387+
issue: https://github.com/elastic/elasticsearch/issues/121350
382388

383389
# Examples:
384390
#

rest-api-spec/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,5 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task ->
7373
task.skipTest("index/92_metrics_auto_subobjects/Root without subobjects with synthetic source", "_source.mode mapping attribute is no-op since 9.0.0")
7474
task.skipTest("index/91_metrics_no_subobjects/Metrics object indexing with synthetic source", "_source.mode mapping attribute is no-op since 9.0.0")
7575
task.skipTest("index/91_metrics_no_subobjects/Root without subobjects with synthetic source", "_source.mode mapping attribute is no-op since 9.0.0")
76+
task.skipTest("indices.create/20_synthetic_source/synthetic_source with copy_to inside nested object", "temporary until backported")
7677
})
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
copy_to from object with dynamic strict to dynamic field:
3+
- requires:
4+
cluster_features: ["mapper.copy_to.dynamic_handling"]
5+
reason: requires a fix
6+
7+
- do:
8+
indices.create:
9+
index: test
10+
body:
11+
mappings:
12+
properties:
13+
one:
14+
dynamic: strict
15+
properties:
16+
k:
17+
type: keyword
18+
copy_to: two.k
19+
20+
- do:
21+
index:
22+
index: test
23+
id: 1
24+
refresh: true
25+
body:
26+
one:
27+
k: "hey"
28+
29+
- do:
30+
search:
31+
index: test
32+
body:
33+
docvalue_fields: [ "two.k.keyword" ]
34+
35+
- match:
36+
hits.hits.0._source:
37+
one:
38+
k: "hey"
39+
- match:
40+
hits.hits.0.fields:
41+
two.k.keyword: [ "hey" ]

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ static TransportVersion def(int id) {
171171
public static final TransportVersion LINEAR_RETRIEVER_SUPPORT = def(8_837_00_0);
172172
public static final TransportVersion TIMEOUT_GET_PARAM_FOR_RESOLVE_CLUSTER = def(8_838_00_0);
173173
public static final TransportVersion INFERENCE_REQUEST_ADAPTIVE_RATE_LIMITING = def(8_839_00_0);
174+
public static final TransportVersion ML_INFERENCE_IBM_WATSONX_RERANK_ADDED = def(8_840_00_0);
174175

175176
/*
176177
* STOP! READ THIS FIRST! No, really,

server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ private Wrapper(ObjectMapper parent, DocumentParserContext in) {
5050
this.in = in;
5151
}
5252

53+
// Used to create a copy_to context.
54+
// It is important to reset `dynamic` here since it is possible that we copy into a completely different object.
55+
private Wrapper(RootObjectMapper root, DocumentParserContext in) {
56+
super(root, ObjectMapper.Dynamic.getRootDynamic(in.mappingLookup()), in);
57+
this.in = in;
58+
}
59+
5360
@Override
5461
public Iterable<LuceneDocument> nonRootDocuments() {
5562
return in.nonRootDocuments();
@@ -711,6 +718,7 @@ in synthetic _source (to be consistent with stored _source).
711718

712719
ContentPath path = new ContentPath();
713720
XContentParser parser = DotExpandingXContentParser.expandDots(new CopyToParser(copyToField, parser()), path);
721+
714722
return new Wrapper(root(), this) {
715723
@Override
716724
public ContentPath path() {

server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class MapperFeatures implements FeatureSpecification {
3030
public static final NodeFeature META_FETCH_FIELDS_ERROR_CODE_CHANGED = new NodeFeature("meta_fetch_fields_error_code_changed");
3131
public static final NodeFeature SPARSE_VECTOR_STORE_SUPPORT = new NodeFeature("mapper.sparse_vector.store_support");
3232
public static final NodeFeature SORT_FIELDS_CHECK_FOR_NESTED_OBJECT_FIX = new NodeFeature("mapper.nested.sorting_fields_check_fix");
33+
public static final NodeFeature DYNAMIC_HANDLING_IN_COPY_TO = new NodeFeature("mapper.copy_to.dynamic_handling");
3334

3435
@Override
3536
public Set<NodeFeature> getTestFeatures() {
@@ -45,8 +46,9 @@ public Set<NodeFeature> getTestFeatures() {
4546
CONSTANT_KEYWORD_SYNTHETIC_SOURCE_WRITE_FIX,
4647
META_FETCH_FIELDS_ERROR_CODE_CHANGED,
4748
SPARSE_VECTOR_STORE_SUPPORT,
48-
SORT_FIELDS_CHECK_FOR_NESTED_OBJECT_FIX,
4949
COUNTED_KEYWORD_SYNTHETIC_SOURCE_NATIVE_SUPPORT,
50+
SORT_FIELDS_CHECK_FOR_NESTED_OBJECT_FIX,
51+
DYNAMIC_HANDLING_IN_COPY_TO,
5052
SourceFieldMapper.SYNTHETIC_RECOVERY_SOURCE,
5153
ObjectMapper.SUBOBJECTS_FALSE_MAPPING_UPDATE_FIX
5254
);

0 commit comments

Comments
 (0)