-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ScrollAll() #2443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScrollAll() #2443
Conversation
russcam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good, just a few small nitpicks 😄
Are there tests for the ScrollAll observable too?
| public ISearchResponse<T> SearchResponse { get; internal set; } | ||
|
|
||
| public int Scroll { get; internal set; } | ||
| public long Scroll { get; internal set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch 👍
| private readonly ISearchRequest _searchRequest; | ||
| private readonly IConnectionSettingsValues _connectionSettings; | ||
| private readonly IElasticClient _client; | ||
| private static IList<ISort> DocOrderSort = new ReadOnlyCollection<ISort>(new List<ISort> { new SortField { Field = "_doc" } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should DocOrderSort be applied only if a sort is not specified on the search request? If it will always be applied, I think it should also be mentioned in the comment on Search on IScrollAllRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
| } | ||
| public ScrollAllRequest(Time scrollTime, int numberOfSlices, Field routingField) : this(scrollTime, numberOfSlices) | ||
| { | ||
| ((IScrollAllRequest)this).RoutingField = routingField; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nitpick: the cast to interface is not needed
| <Compile Include="Search\Request\SlicedScrollSearchUsageTests.cs" /> | ||
| <Compile Include="Search\Request\SearchAfterUsageTests.cs" /> | ||
| <Compile Include="Search\Scroll\Scroll\SlicedScrollApiTests.cs" /> | ||
| <Compile Include="Search\Scroll\Scroll\SlicedScrollSearchApiTests.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be called ScrollAllApiTests.cs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No :) These just test the sliced scroll on _search. I've added ScrollAll observable tests to bulkall to save on running times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool cool, I thought I must have missed it 👍
Exposes a sliced scroll behind an observable with an optional max degree of parallelism
…et scroll to _doc order if the user did not supply a sort of their own
a93e1ca to
43d5e55
Compare
* ScrollAll() Exposes a sliced scroll behind an observable with an optional max degree of parallelism * implemented review feedback from @russcam, unneccessary cast + only set scroll to _doc order if the user did not supply a sort of their own
|
ported to |
* ScrollAll() Exposes a sliced scroll behind an observable with an optional max degree of parallelism * implemented review feedback from @russcam, unneccessary cast + only set scroll to _doc order if the user did not supply a sort of their own
Exposes a sliced scroll behind an observable with an optional max degree
of parallelism