Skip to content

Commit 824dd64

Browse files
committed
Merge branch 'main' of github.com:elastic/elasticsearch into es-111273
2 parents 94d33e5 + b892e44 commit 824dd64

File tree

25 files changed

+330
-37
lines changed

25 files changed

+330
-37
lines changed

docs/changelog/124669.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pr: 124669
2+
summary: Release semantic_text as a GA feature
3+
area: Mapping
4+
type: feature
5+
issues: []
6+
highlight:
7+
title: Release semantic_text as a GA feature
8+
body: semantic_text is now an official GA (generally available) feature!
9+
This field type allows you to easily set up and perform semantic search with minimal ramp up time.
10+
notable: true

docs/changelog/125171.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 125171
2+
summary: Reindex data stream indices on different nodes
3+
area: Data streams
4+
type: enhancement
5+
issues: []

docs/changelog/125244.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 125244
2+
summary: Disable logging in `ClusterFormationFailureHelper` on shutdown
3+
area: Cluster Coordination
4+
type: bug
5+
issues:
6+
- 105559

docs/reference/elasticsearch/mapping-reference/semantic-text.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ mapped_pages:
66

77
# Semantic text field type [semantic-text]
88

9-
10-
::::{warning}
11-
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
12-
::::
13-
14-
159
The `semantic_text` field type automatically generates embeddings for text content using an inference endpoint. Long passages are [automatically chunked](#auto-text-chunking) to smaller sections to enable the processing of larger corpuses of text.
1610

1711
The `semantic_text` field type specifies an inference endpoint identifier that will be used to generate embeddings. You can create the inference endpoint by using the [Create {{infer}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put). This field type and the [`semantic` query](/reference/query-languages/query-dsl/query-dsl-semantic-query.md) type make it simpler to perform semantic search on your data. The `semantic_text` field type may also be queried with [match](/reference/query-languages/query-dsl/query-dsl-match-query.md), [sparse_vector](/reference/query-languages/query-dsl/query-dsl-sparse-vector-query.md) or [knn](/reference/query-languages/query-dsl/query-dsl-knn-query.md) queries.

docs/reference/query-languages/query-dsl/query-dsl-semantic-query.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ mapped_pages:
66

77
# Semantic query [query-dsl-semantic-query]
88

9-
10-
::::{warning}
11-
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
12-
::::
13-
14-
159
The `semantic` query type enables you to perform [semantic search](docs-content://solutions/search/semantic-search.md) on data stored in a [`semantic_text`](/reference/elasticsearch/mapping-reference/semantic-text.md) field.
1610

1711

muted-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,6 @@ tests:
360360
- class: org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleServiceIT
361361
method: testErrorRecordingOnRetention
362362
issue: https://github.com/elastic/elasticsearch/issues/124950
363-
- class: org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecIT
364-
method: test {lookup-join.MvJoinKeyFromRow SYNC}
365-
issue: https://github.com/elastic/elasticsearch/issues/124951
366363
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
367364
method: testStopQueryLocalNoRemotes
368365
issue: https://github.com/elastic/elasticsearch/issues/124959
@@ -387,9 +384,6 @@ tests:
387384
- class: org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleServiceIT
388385
method: testLifecycleAppliedToFailureStore
389386
issue: https://github.com/elastic/elasticsearch/issues/124999
390-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
391-
method: test {p0=search/610_function_score/Random}
392-
issue: https://github.com/elastic/elasticsearch/issues/125010
393387
- class: org.elasticsearch.xpack.ilm.DataStreamAndIndexLifecycleMixingTests
394388
method: testGetDataStreamResponse
395389
issue: https://github.com/elastic/elasticsearch/issues/125083
@@ -402,6 +396,9 @@ tests:
402396
- class: org.elasticsearch.index.engine.ThreadPoolMergeSchedulerTests
403397
method: testSchedulerCloseWaitsForRunningMerge
404398
issue: https://github.com/elastic/elasticsearch/issues/125236
399+
- class: org.elasticsearch.reservedstate.service.ReservedClusterStateServiceTests
400+
method: testProcessMultipleChunks
401+
issue: https://github.com/elastic/elasticsearch/issues/125305
405402

406403
# Examples:
407404
#

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/610_function_score.yml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,55 @@
7171
}
7272
},
7373
"random_score": {
74-
"seed": 10
74+
"seed": 10,
75+
"field": "uuid"
7576
}
7677
}
7778

7879
- length: { hits.hits: 2 }
7980
- match: { hits.total.value: 2 }
8081

82+
---
83+
"No field only runs on 9.x":
84+
- requires:
85+
cluster_features: [ "gte_v9.0.0" ]
86+
reason: "empty field works seamlessly (relying on _seqno since 9.x)"
87+
- do:
88+
indices.create:
89+
index: test
90+
body:
91+
mappings:
92+
properties:
93+
text:
94+
type: text
95+
96+
- do:
97+
index:
98+
index: test
99+
id: "1"
100+
body: { text: "foo bar", uuid: 1234 }
101+
102+
- do:
103+
index:
104+
index: test
105+
id: "2"
106+
body: { text: "high bar", uuid: 5678 }
107+
108+
- do:
109+
index:
110+
index: test
111+
id: "3"
112+
body: { text: "raise bar", uuid: 9012 }
113+
114+
- do:
115+
index:
116+
index: test
117+
id: "3"
118+
body: { text: "raise hands", uuid: 3456 }
119+
120+
- do:
121+
indices.refresh:
122+
index: [ test ]
81123
- do:
82124
search:
83125
index: test
@@ -91,10 +133,8 @@
91133
}
92134
},
93135
"random_score": {
94-
"seed": 10,
95-
"field": "uuid"
136+
"seed": 10
96137
}
97138
}
98-
99139
- length: { hits.hits: 2 }
100140
- match: { hits.total.value: 2 }

server/src/main/java/org/elasticsearch/cluster/coordination/ClusterFormationFailureHelper.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public class ClusterFormationFailureHelper {
6868
private final Runnable logLastFailedJoinAttempt;
6969
@Nullable // if no warning is scheduled
7070
private volatile WarningScheduler warningScheduler;
71+
private volatile boolean loggingEnabled;
7172

7273
/**
7374
* Works with the {@link JoinHelper} to log the latest node-join attempt failure and cluster state debug information. Must call
@@ -90,6 +91,11 @@ public ClusterFormationFailureHelper(
9091
this.clusterCoordinationExecutor = threadPool.executor(Names.CLUSTER_COORDINATION);
9192
this.clusterFormationWarningTimeout = DISCOVERY_CLUSTER_FORMATION_WARNING_TIMEOUT_SETTING.get(settings);
9293
this.logLastFailedJoinAttempt = logLastFailedJoinAttempt;
94+
this.loggingEnabled = true;
95+
}
96+
97+
public void setLoggingEnabled(boolean enabled) {
98+
this.loggingEnabled = enabled;
9399
}
94100

95101
public boolean isRunning() {
@@ -98,7 +104,7 @@ public boolean isRunning() {
98104

99105
/**
100106
* Schedules a warning debug message to be logged in 'clusterFormationWarningTimeout' time, and periodically thereafter, until
101-
* {@link ClusterFormationState#stop()} has been called.
107+
* {@link ClusterFormationFailureHelper#stop()} has been called.
102108
*/
103109
public void start() {
104110
assert warningScheduler == null;
@@ -125,7 +131,7 @@ public void onFailure(Exception e) {
125131

126132
@Override
127133
protected void doRun() {
128-
if (isActive()) {
134+
if (isActive() && loggingEnabled) {
129135
logLastFailedJoinAttempt.run();
130136
logger.warn(
131137
"{}; for troubleshooting guidance, see {}",

server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,7 @@ protected void doStart() {
11041104
applierState = initialState;
11051105
clusterApplier.setInitialState(initialState);
11061106
}
1107+
clusterFormationFailureHelper.setLoggingEnabled(true);
11071108
}
11081109

11091110
public DiscoveryStats stats() {
@@ -1126,6 +1127,7 @@ public void startInitialJoin() {
11261127
protected void doStop() {
11271128
configuredHostsResolver.stop();
11281129
joinValidationService.stop();
1130+
clusterFormationFailureHelper.setLoggingEnabled(false);
11291131
}
11301132

11311133
@Override

server/src/main/java/org/elasticsearch/cluster/metadata/ProjectId.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static ProjectId fromId(String id) {
5454
}
5555
}
5656

57-
static boolean isValidFormatId(String id) {
57+
public static boolean isValidFormatId(String id) {
5858
if (id.length() > MAX_LENGTH) {
5959
return false;
6060
}

0 commit comments

Comments
 (0)