Skip to content

Commit f604a1f

Browse files
authored
Merge branch 'main' into lucene_snapshot_10_1
2 parents 097aa45 + 9bc9ba7 commit f604a1f

File tree

137 files changed

+2249
-1406
lines changed

Some content is hidden

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

137 files changed

+2249
-1406
lines changed

.buildkite/pipelines/pull-request/part-4-entitlements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ steps:
77
agents:
88
provider: gcp
99
image: family/elasticsearch-ubuntu-2004
10-
machineType: custom-32-98304
10+
machineType: n1-standard-32
1111
buildDirectory: /dev/shm/bk

.buildkite/pipelines/pull-request/part-4-fips.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ steps:
77
agents:
88
provider: gcp
99
image: family/elasticsearch-ubuntu-2004
10-
machineType: custom-32-98304
10+
machineType: n1-standard-32
1111
buildDirectory: /dev/shm/bk

.buildkite/pipelines/pull-request/part-4.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ steps:
77
agents:
88
provider: gcp
99
image: family/elasticsearch-ubuntu-2004
10-
machineType: custom-32-98304
10+
machineType: n1-standard-32
1111
buildDirectory: /dev/shm/bk

docs/changelog/117504.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 117504
2+
summary: Fix NPE caused by race condition in async search when minimise round trips
3+
is true
4+
area: Search
5+
type: bug
6+
issues: []

docs/changelog/119003.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 119003
2+
summary: Add a `replicate_for` option to the ILM `searchable_snapshot` action
3+
area: ILM+SLM
4+
type: enhancement
5+
issues: []

docs/changelog/120527.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 120527
2+
summary: Implement a `MetricsAware` interface
3+
area: ES|QL
4+
type: enhancement
5+
issues:
6+
- 115992

docs/changelog/120813.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
pr: 120813
2+
summary: Change Semantic Text To Act Like A Normal Text Field
3+
area: Search
4+
type: breaking
5+
issues: []
6+
breaking:
7+
title: Change Semantic Text To Act Like A Normal Text Field
8+
area: Search
9+
details:
10+
The previous semantic_text format used a complex subfield structure in _source to store the embeddings.
11+
This complicated interactions/integrations with semantic_text fields and _source in general.
12+
This new semantic_text format treats it as a normal text field, where the field's value in _source is the value assigned by the user.
13+
impact:
14+
Users who parsed the subfield structure of the previous semantic_text format in _source will need to update their parsing logic.
15+
The new format does not directly expose the chunks and embeddings generated from the input text.
16+
The new format will be applied to all new indices, any existing indices will continue to use the previous format.
17+
notable: true

docs/changelog/120833.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120833
2+
summary: Optimize `IngestCtxMap` construction
3+
area: Ingest Node
4+
type: enhancement
5+
issues: []

docs/reference/ilm/actions/ilm-searchable-snapshot.asciidoc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ snapshot retention runs off the index lifecycle management (ILM) policies and is
5555
(Required, string)
5656
<<snapshots-register-repository,Repository>> used to store the snapshot.
5757

58+
`replicate_for`::
59+
(Optional, TimeValue)
60+
By default, searchable snapshot indices are mounted without replicas. Using this will
61+
result in a searchable snapshot index being mounted with a single replica for the time period
62+
specified, after which the replica will be removed. This option is only permitted on the
63+
first searchable snapshot action of a policy.
64+
5865
`force_merge_index`::
5966
(Optional, Boolean)
6067
Force merges the managed index to one segment.
@@ -109,3 +116,44 @@ PUT _ilm/policy/my_policy
109116
}
110117
}
111118
--------------------------------------------------
119+
120+
[[ilm-searchable-snapshot-replicate-for-ex]]
121+
===== Mount a searchable snapshot with replicas for fourteen days
122+
123+
This policy mounts a searchable snapshot in the hot phase with a
124+
single replica and maintains that replica for fourteen days. After
125+
that time has elapsed, the searchable snapshot index will remain (with
126+
no replicas) for another fourteen days, at which point it will proceed
127+
into the delete phase and will be deleted.
128+
129+
[source,console]
130+
--------------------------------------------------
131+
PUT _ilm/policy/my_policy
132+
{
133+
"policy": {
134+
"phases": {
135+
"hot": {
136+
"actions": {
137+
"rollover" : {
138+
"max_primary_shard_size": "50gb"
139+
},
140+
"searchable_snapshot" : {
141+
"snapshot_repository" : "backing_repo",
142+
"replicate_for": "14d"
143+
}
144+
}
145+
},
146+
"delete": {
147+
"min_age": "28d",
148+
"actions": {
149+
"delete" : { }
150+
}
151+
}
152+
}
153+
}
154+
}
155+
--------------------------------------------------
156+
157+
[NOTE]
158+
If the `replicate_for` option is specified, its value must be
159+
less than the minimum age of the next phase in the policy.

modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/ConvertProcessorTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ public void testAutoConvertNotString() throws Exception {
527527
}
528528
default -> throw new UnsupportedOperationException();
529529
}
530-
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), Map.of("field", randomValue));
530+
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>(Map.of("field", randomValue)));
531531
Processor processor = new ConvertProcessor(randomAlphaOfLength(10), null, "field", "field", Type.AUTO, false);
532532
processor.execute(ingestDocument);
533533
Object convertedValue = ingestDocument.getFieldValue("field", Object.class);
@@ -536,7 +536,7 @@ public void testAutoConvertNotString() throws Exception {
536536

537537
public void testAutoConvertStringNotMatched() throws Exception {
538538
String value = "notAnIntFloatOrBool";
539-
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), Map.of("field", value));
539+
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>(Map.of("field", value)));
540540
Processor processor = new ConvertProcessor(randomAlphaOfLength(10), null, "field", "field", Type.AUTO, false);
541541
processor.execute(ingestDocument);
542542
Object convertedValue = ingestDocument.getFieldValue("field", Object.class);
@@ -546,7 +546,7 @@ public void testAutoConvertStringNotMatched() throws Exception {
546546
public void testAutoConvertMatchBoolean() throws Exception {
547547
boolean randomBoolean = randomBoolean();
548548
String booleanString = Boolean.toString(randomBoolean);
549-
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), Map.of("field", booleanString));
549+
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>(Map.of("field", booleanString)));
550550
Processor processor = new ConvertProcessor(randomAlphaOfLength(10), null, "field", "field", Type.AUTO, false);
551551
processor.execute(ingestDocument);
552552
Object convertedValue = ingestDocument.getFieldValue("field", Object.class);
@@ -556,7 +556,7 @@ public void testAutoConvertMatchBoolean() throws Exception {
556556
public void testAutoConvertMatchInteger() throws Exception {
557557
int randomInt = randomInt();
558558
String randomString = Integer.toString(randomInt);
559-
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), Map.of("field", randomString));
559+
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>(Map.of("field", randomString)));
560560
Processor processor = new ConvertProcessor(randomAlphaOfLength(10), null, "field", "field", Type.AUTO, false);
561561
processor.execute(ingestDocument);
562562
Object convertedValue = ingestDocument.getFieldValue("field", Object.class);
@@ -566,7 +566,7 @@ public void testAutoConvertMatchInteger() throws Exception {
566566
public void testAutoConvertMatchLong() throws Exception {
567567
long randomLong = randomLong();
568568
String randomString = Long.toString(randomLong);
569-
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), Map.of("field", randomString));
569+
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>(Map.of("field", randomString)));
570570
Processor processor = new ConvertProcessor(randomAlphaOfLength(10), null, "field", "field", Type.AUTO, false);
571571
processor.execute(ingestDocument);
572572
Object convertedValue = ingestDocument.getFieldValue("field", Object.class);
@@ -577,7 +577,7 @@ public void testAutoConvertDoubleNotMatched() throws Exception {
577577
double randomDouble = randomDouble();
578578
String randomString = Double.toString(randomDouble);
579579
float randomFloat = Float.parseFloat(randomString);
580-
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), Map.of("field", randomString));
580+
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>(Map.of("field", randomString)));
581581
Processor processor = new ConvertProcessor(randomAlphaOfLength(10), null, "field", "field", Type.AUTO, false);
582582
processor.execute(ingestDocument);
583583
Object convertedValue = ingestDocument.getFieldValue("field", Object.class);
@@ -588,7 +588,7 @@ public void testAutoConvertDoubleNotMatched() throws Exception {
588588
public void testAutoConvertMatchFloat() throws Exception {
589589
float randomFloat = randomFloat();
590590
String randomString = Float.toString(randomFloat);
591-
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), Map.of("field", randomString));
591+
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>(Map.of("field", randomString)));
592592
Processor processor = new ConvertProcessor(randomAlphaOfLength(10), null, "field", "field", Type.AUTO, false);
593593
processor.execute(ingestDocument);
594594
Object convertedValue = ingestDocument.getFieldValue("field", Object.class);

0 commit comments

Comments
 (0)