# "Search After" feature of ElasticSearch using NEST API

**URL:** <https://discuss.elastic.co/t/search-after-feature-of-elasticsearch-using-nest-api/66182>\
**Category:** Elasticsearch\
**Created:** [November 16, 2016, 12:32am UTC](https://discuss.elastic.co/t/search-after-feature-of-elasticsearch-using-nest-api/66182 "2016-11-16T00:32:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [November 16, 2016, 12:32am UTC](https://discuss.elastic.co/t/search-after-feature-of-elasticsearch-using-nest-api/66182/1 "2016-11-16T00:32:27Z")

</div>

Hi,

I am on NEST.5.0.0-rc1 and Elasticsearch.Net.5.0.0-rc1  
I am trying to use the "Search After" feature of ElasticSearch using NEST API.  
But it looks that it is not supported yet.

The NEST provides Search, SearchAsync, SearchShards etc. I am at my wits end how to use the "Search After" feature with the Search functions.

[Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-search-after.html) is here.

This is the method I have into which I want to fold in the "Search After" functionality.

```
var r = await this.client.SearchAsync<DemoEvent>(s => s
    .Query(q =>
        q.QueryString(c =>
            c.Query(searchQuery)))
    .From(from)
    .Size(size)
    .Index("DemoIndex*")
    .Sort(ss =>
        ss.Descending(f => f.TimeStamp))
        );

if (r.IsValid)
    return new Result() { Hits = r.HitsMetaData.Total, DemoEvents = r.Hits.Select(h => h.Source) };
```

---

<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 16, 2016, 12:52am UTC](https://discuss.elastic.co/t/search-after-feature-of-elasticsearch-using-nest-api/66182/2 "2016-11-16T00:52:25Z")

</div>

Hi @pk.241011

[It's been mapped](https://github.com/elastic/elasticsearch-net/commit/3a80aebd6dadbff2de12123bf1f35b655d2c9a4b) but is not in the last prerelease on nuget, NEST-5.0.0-rc1. We are looking to put out a new 5.x release this week.

In the meantime, if waiting for the next nuget 5.x release is too long, you can use a [CI build of 5.x available in MyGet that includes `.SearchAfter()`.](https://myget.org/feed/elasticsearch-net-next/package/nuget/NEST)

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [November 16, 2016, 3:06am UTC](https://discuss.elastic.co/t/search-after-feature-of-elasticsearch-using-nest-api/66182/3 "2016-11-16T03:06:56Z")

</div>

Thanks for the quick reply. I will wait for the release. 🙂

---

<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 14, 2016, 3:07am UTC](https://discuss.elastic.co/t/search-after-feature-of-elasticsearch-using-nest-api/66182/4 "2016-12-14T03:07:41Z")

</div>

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