Skip to content

Commit e0d2616

Browse files
authored
CCS with minimize_roundtrips performs incremental merges of each SearchResponse (#105781)
This restores the functionality that was removed from 8.13 (waiting for a change on the Kibana side). The work for this feature was added in #103134 but we had to remove the yaml changelog when we turned off the functionality in #105455. So this PR restores the changelog yaml as well.
1 parent e568f70 commit e0d2616

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

docs/changelog/105781.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 105781
2+
summary: CCS with `minimize_roundtrips` performs incremental merges of each `SearchResponse`
3+
area: Search
4+
type: enhancement
5+
issues: []

x-pack/plugin/async-search/src/main/java/org/elasticsearch/xpack/search/MutableSearchResponse.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,10 @@ synchronized AsyncSearchResponse toAsyncSearchResponse(AsyncSearchTask task, lon
306306
* (for local-only/CCS minimize_roundtrips=false)
307307
*/
308308
private SearchResponseMerger createSearchResponseMerger(AsyncSearchTask task) {
309-
return null;
310-
// TODO uncomment this code once Kibana moves to polling the _async_search/status endpoint to determine if a search is done
311-
// if (task.getSearchResponseMergerSupplier() == null) {
312-
// return null; // local search and CCS minimize_roundtrips=false
313-
// }
314-
// return task.getSearchResponseMergerSupplier().get();
309+
if (task.getSearchResponseMergerSupplier() == null) {
310+
return null; // local search and CCS minimize_roundtrips=false
311+
}
312+
return task.getSearchResponseMergerSupplier().get();
315313
}
316314

317315
private SearchResponse getMergedResponse(SearchResponseMerger merger) {

0 commit comments

Comments
 (0)