I know, I'm so stupid that I cannot see how, but I'm new with elasticsearch.
I want to know how can i do a simple pagination.
Like: 1 To 10 Of 123,456 entries
I need to know the total hits for the query, have sense right?
public long GetCount(SearchModel model)
{
return _elasticClient.Search<Document>(s => s
.Query(q => GetWhere(q, model))
).Total;
}
I'm not using From/Size because I want to get the total records for the query (that simple).
I tried ISearchResponse.Total and that ignores the query filters
some advice will be very appreciated, thanks