Skip to content

Commit bf4560d

Browse files
committed
ScrollAll all should not throw if one of the slices yields no results
1 parent 813987e commit bf4560d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Nest/Document/Multiple/ScrollAll/ScrollAllObservable.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ private async Task<ISearchResponse<T>> InitiateSearchAsync(int slice)
122122
Field = this._scrollAllRequest.RoutingField
123123
};
124124
var response = await this._client.SearchAsync<T>(this._searchRequest, this._compositeCancelToken).ConfigureAwait(false);
125-
if (response.Total <= 0)
126-
throw Throw($"ScrollAll query against {response.ApiCall.Uri.PathAndQuery} doesn't contain any documents.", response.ApiCall);
125+
//response gets passed to ScrollToCompletionAsync which does validation already
127126
return response;
128127
}
129128
finally { _scrollInitiationLock.Release(); }

0 commit comments

Comments
 (0)