"Search After" feature of ElasticSearch using NEST API

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 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) };

Hi @pk.241011

It's been mapped 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().

Thanks for the quick reply. I will wait for the release. :slight_smile:

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