NEST 6x, ScrollAll<T, TResult>

(Alberto Soares) #1

Hi. I'm currently updating elastic from v1.7 to 6.4, and of course, also updating the NEST in the code.

The ScrollAll only accepts T, is there any plans to also give a type out (TResult), this was on the 1.7 version, and on the ScrollAll its possible to just get the fields that you want, so I think it makes sense that we can give a type for the output.

Or this is already done and I'm missing something?


(Russ Cam) #2

NEST 1.x doesn't contain a ScrollAll observable extension method; the Scroll method in 1.x has a ConcreteTypeSelector method to be able to support covariance of search results, but this was removed in 6.x.

I think what you're after in NEST 6.x however is source filtering, to return only the fields from _source that you are interested in. In using source filtering, your instances of T will only have those fields initialized from the the deserialization of the response that you requested in the request.