# NEST 6x, ScrollAll\<T, TResult\>

**URL:** <https://discuss.elastic.co/t/nest-6x-scrollall-t-tresult/157691>\
**Category:** Elasticsearch\
**Created:** [November 21, 2018, 11:17am UTC](https://discuss.elastic.co/t/nest-6x-scrollall-t-tresult/157691 "2018-11-21T11:17:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheKahuna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thekahuna/32/5422_2.png) [@TheKahuna](https://discuss.elastic.co/u/TheKahuna)\
**Post date:** [November 21, 2018, 11:17am UTC](https://discuss.elastic.co/t/nest-6x-scrollall-t-tresult/157691/1 "2018-11-21T11:17:38Z")

</div>

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?

Thx

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [November 26, 2018, 2:37am UTC](https://discuss.elastic.co/t/nest-6x-scrollall-t-tresult/157691/2 "2018-11-26T02:37:42Z")

</div>

> [@TheKahuna](#):
>
> 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.

NEST 1.x doesn't contain a `ScrollAll` observable extension method; the `Scroll` method in 1.x has a [`ConcreteTypeSelector` method](https://www.elastic.co/guide/en/elasticsearch/client/net-api/1.x/nest-basics.html#_covariance) 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](https://www.elastic.co/guide/en/elasticsearch/client/net-api/6.x/returned-fields.html#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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 24, 2018, 2:37am UTC](https://discuss.elastic.co/t/nest-6x-scrollall-t-tresult/157691/3 "2018-12-24T02:37:42Z")

</div>

Closed on December 24, 2018, 2:37am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
