Skip to content

Commit 083a437

Browse files
committed
merging main
2 parents c7ffd3e + afb83b7 commit 083a437

File tree

18 files changed

+348
-53
lines changed

18 files changed

+348
-53
lines changed

docs/changelog/126770.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 126770
2+
summary: Remove empty results before merging
3+
area: Search
4+
type: bug
5+
issues:
6+
- 126742

docs/reference/elasticsearch/rest-apis/retrievers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,11 @@ Refer to [*Semantic re-ranking*](docs-content://solutions/search/ranking/semanti
560560

561561
### Prerequisites [_prerequisites_15]
562562

563-
To use `text_similarity_reranker`, you can rely on the preconfigured `.rerank-v1-elasticsearch` inference endpoint, which is based on [Elastic Rerank](https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-rerank.html) and serves as the default if no `inference_id` is provided. This model is optimized for reranking based on text similarity. If you'd like to use a different model, you can set up a custom inference endpoint for the `rerank` task using the [Create {{infer}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put). The endpoint should be configured with a machine learning model capable of computing text similarity. Refer to [the Elastic NLP model reference](docs-content://explore-analyze/machine-learning/nlp/ml-nlp-model-ref.md#ml-nlp-model-ref-text-similarity) for a list of third-party text similarity models supported by {{es}}.
563+
To use `text_similarity_reranker`, you can rely on the preconfigured `.rerank-v1-elasticsearch` inference endpoint, which uses the [Elastic Rerank model](docs-content://explore-analyze/machine-learning/nlp/ml-nlp-rerank.md) and serves as the default if no `inference_id` is provided. This model is optimized for reranking based on text similarity. If you'd like to use a different model, you can set up a custom inference endpoint for the `rerank` task using the [Create {{infer}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put). The endpoint should be configured with a machine learning model capable of computing text similarity. Refer to [the Elastic NLP model reference](docs-content://explore-analyze/machine-learning/nlp/ml-nlp-model-ref.md#ml-nlp-model-ref-text-similarity) for a list of third-party text similarity models supported by {{es}}.
564564

565565
You have the following options:
566566

567-
* Use the built-in [Elastic Rerank](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put) cross-encoder model via the inference API’s {{es}} service. For an example of creating an endpoint using the Elastic Rerank model, refer to [this guide](https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elasticsearch.html#inference-example-elastic-reranker).
567+
* Use the built-in [Elastic Rerank](docs-content://explore-analyze/machine-learning/nlp/ml-nlp-rerank.md) cross-encoder model via the inference API’s {{es}} service. See [this example](https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elasticsearch.html#inference-example-elastic-reranker) for creating an endpoint using the Elastic Rerank model.
568568
* Use the [Cohere Rerank inference endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put) with the `rerank` task type.
569569
* Use the [Google Vertex AI inference endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put) with the `rerank` task type.
570570
* Upload a model to {{es}} with [Eland](eland://reference/machine-learning.md#ml-nlp-pytorch) using the `text_similarity` NLP task type.

muted-tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,6 @@ tests:
315315
- class: org.elasticsearch.search.CCSDuelIT
316316
method: testTerminateAfter
317317
issue: https://github.com/elastic/elasticsearch/issues/126085
318-
- class: org.elasticsearch.search.sort.GeoDistanceIT
319-
method: testDistanceSortingWithUnmappedField
320-
issue: https://github.com/elastic/elasticsearch/issues/126118
321318
- class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT
322319
method: testSearchWithRandomDisconnects
323320
issue: https://github.com/elastic/elasticsearch/issues/122707
@@ -387,9 +384,6 @@ tests:
387384
- class: org.elasticsearch.xpack.esql.action.EsqlActionIT
388385
method: testQueryOnEmptyDataIndex
389386
issue: https://github.com/elastic/elasticsearch/issues/126580
390-
- class: org.elasticsearch.xpack.ilm.TimeSeriesDataStreamsIT
391-
method: testShrinkActionInPolicyWithoutHotPhase
392-
issue: https://github.com/elastic/elasticsearch/issues/126746
393387
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
394388
method: test {p0=transform/transforms_start_stop/Test start/stop/start continuous transform}
395389
issue: https://github.com/elastic/elasticsearch/issues/126755
@@ -432,6 +426,12 @@ tests:
432426
- class: org.elasticsearch.xpack.search.AsyncSearchActionIT
433427
method: testRestartAfterCompletion
434428
issue: https://github.com/elastic/elasticsearch/issues/126974
429+
- class: org.elasticsearch.xpack.search.AsyncSearchActionIT
430+
method: testDeleteCleanupIndex
431+
issue: https://github.com/elastic/elasticsearch/issues/127008
432+
- class: org.elasticsearch.packaging.test.DockerTests
433+
method: test024InstallPluginFromArchiveUsingConfigFile
434+
issue: https://github.com/elastic/elasticsearch/issues/126936
435435

436436
# Examples:
437437
#

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ static TransportVersion def(int id) {
225225
public static final TransportVersion ESQL_QUERY_PLANNING_DURATION = def(9_051_0_00);
226226
public static final TransportVersion ESQL_DOCUMENTS_FOUND_AND_VALUES_LOADED = def(9_052_0_00);
227227
public static final TransportVersion BATCHED_QUERY_EXECUTION_DELAYABLE_WRITABLE = def(9_053_0_00);
228-
public static final TransportVersion SETTINGS_IN_DATA_STREAMS = def(9_054_00_0);
228+
public static final TransportVersion SEARCH_INCREMENTAL_TOP_DOCS_NULL = def(9_054_0_00);
229+
public static final TransportVersion SETTINGS_IN_DATA_STREAMS = def(9_055_00_0);
229230

230231
/*
231232
* STOP! READ THIS FIRST! No, really,

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package org.elasticsearch.action.admin.cluster.snapshots.status;
1111

1212
import org.elasticsearch.action.support.broadcast.BroadcastShardResponse;
13+
import org.elasticsearch.common.Strings;
1314
import org.elasticsearch.common.io.stream.StreamInput;
1415
import org.elasticsearch.common.io.stream.StreamOutput;
1516
import org.elasticsearch.index.shard.ShardId;
@@ -161,4 +162,9 @@ public int hashCode() {
161162
result = 31 * result + (failure != null ? failure.hashCode() : 0);
162163
return result;
163164
}
165+
166+
@Override
167+
public String toString() {
168+
return Strings.toString(this, true, true);
169+
}
164170
}

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
package org.elasticsearch.action.admin.cluster.snapshots.status;
1111

12+
import org.elasticsearch.common.Strings;
1213
import org.elasticsearch.xcontent.ToXContentFragment;
1314
import org.elasticsearch.xcontent.XContentBuilder;
1415

@@ -133,4 +134,9 @@ public int hashCode() {
133134
result = 31 * result + (stats != null ? stats.hashCode() : 0);
134135
return result;
135136
}
137+
138+
@Override
139+
public String toString() {
140+
return Strings.toString(this, true, true);
141+
}
136142
}

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
package org.elasticsearch.action.admin.cluster.snapshots.status;
1111

12+
import org.elasticsearch.common.Strings;
1213
import org.elasticsearch.xcontent.ToXContent;
1314
import org.elasticsearch.xcontent.ToXContentObject;
1415
import org.elasticsearch.xcontent.XContentBuilder;
@@ -150,4 +151,9 @@ public int hashCode() {
150151
result = 31 * result + totalShards;
151152
return result;
152153
}
154+
155+
@Override
156+
public String toString() {
157+
return Strings.toString(this, true, true);
158+
}
153159
}

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotStats.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,4 +355,9 @@ public int hashCode() {
355355
result = 31 * result + (int) (processedSize ^ (processedSize >>> 32));
356356
return result;
357357
}
358+
359+
@Override
360+
public String toString() {
361+
return Strings.toString(this, true, true);
362+
}
358363
}

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusResponse.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
package org.elasticsearch.action.admin.cluster.snapshots.status;
1111

1212
import org.elasticsearch.action.ActionResponse;
13+
import org.elasticsearch.common.Strings;
1314
import org.elasticsearch.common.collect.Iterators;
1415
import org.elasticsearch.common.io.stream.StreamInput;
1516
import org.elasticsearch.common.io.stream.StreamOutput;
17+
import org.elasticsearch.common.xcontent.ChunkedToXContent;
1618
import org.elasticsearch.common.xcontent.ChunkedToXContentObject;
1719
import org.elasticsearch.xcontent.ToXContent;
1820

@@ -71,4 +73,9 @@ public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params
7173
Iterators.single((b, p) -> b.endArray().endObject())
7274
);
7375
}
76+
77+
@Override
78+
public String toString() {
79+
return Strings.toString(ChunkedToXContent.wrapAsToXContent(this), true, true);
80+
}
7481
}

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ protected void masterOperation(
165165

166166
}
167167

168-
private void buildResponse(
168+
// Package access for testing.
169+
void buildResponse(
169170
SnapshotsInProgress snapshotsInProgress,
170171
SnapshotsStatusRequest request,
171172
List<SnapshotsInProgress.Entry> currentSnapshotEntries,
@@ -190,6 +191,9 @@ private void buildResponse(
190191
for (Map.Entry<RepositoryShardId, SnapshotsInProgress.ShardSnapshotStatus> shardEntry : entry
191192
.shardSnapshotStatusByRepoShardId()
192193
.entrySet()) {
194+
if (task.notifyIfCancelled(listener)) {
195+
return;
196+
}
193197
SnapshotsInProgress.ShardSnapshotStatus status = shardEntry.getValue();
194198
if (status.nodeId() != null) {
195199
// We should have information about this shard from the shard:

0 commit comments

Comments
 (0)