File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
server/src/main/java/org/elasticsearch/action/search Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1423,10 +1423,12 @@ static List<SearchShardIterator> mergeShardsIterators(
14231423 List <SearchShardIterator > localShardIterators ,
14241424 List <SearchShardIterator > remoteShardIterators
14251425 ) {
1426+ final List <SearchShardIterator > shards ;
14261427 if (remoteShardIterators .isEmpty ()) {
1427- return localShardIterators ;
1428+ shards = localShardIterators ;
1429+ } else {
1430+ shards = CollectionUtils .concatLists (remoteShardIterators , localShardIterators );
14281431 }
1429- final List <SearchShardIterator > shards = CollectionUtils .concatLists (remoteShardIterators , localShardIterators );
14301432 shards .sort (SearchShardIterator ::compareTo );
14311433 return shards ;
14321434 }
You can’t perform that action at this time.
0 commit comments