According to Elastic search 
<http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-search-type.html#query-and-fetch>
 if 
working with Query_and_fetch will return size times number of shards 
hits.Following this rule I implemented below query using Nest having 5 
shards

int from = 0;
        int size = 1;

         while (true)
        {
            var result = client.Search<object>(x => x
           .SearchType(SearchType.QueryAndFetch)
           .Size(size)
           .From(from * size)
           .Query(qr => qr.MatchAll())
           );

            if (result.Hits.Count() == 0)
            {
                break;
            }
           from++;
        }


If I have total 17 records in index then according to the rule above query 
should execute 4 times returning 5,5,5,2 = 17 total records but this is not 
the case in the above query.
Above query executes 4 times returning 5,3,3,1 = 12 records missing 5 
records.
Am I doing anything wrong or missing anything?

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/311c56ad-c3b9-4aa7-b268-9c3c92e21e55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to