Total Hits in elastic Search prepareSearch() behaves in an inconsistent manner

MatchPhrase too cant help. Again inconsistent results some times 28, sometimes 10.
please find the response below.

{
"took": 0,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 22,
"max_score": 0.021978907,
"hits": [..........]
}
}

I'm using reactive pattern. Does it make any difference?

Observable.create(new OnSubscribe<List<InnerSearchHits>>() {
@Override
public void call(Subscriber<? super List<InnerSearchHits>> t) {

			QueryBuilder queryBuilder = QueryBuilders.matchPhraseQuery(filterKey,filterValue);
			ListenableActionFuture<SearchResponse> f = esClient.getESClient().prepareSearch(index)
            .setQuery(queryBuilder).
            setFrom(0)
            .setSize(10000)
            .execute();
			Observable.from(f).map(x -> {
				List<InnerSearchHits<E>> innerSearchHits = new ArrayList<InnerSearchHits<E>>();
    			SearchHits hits = x.getHits();
    		
    			for (SearchHit searchHit : hits) {
    		.............
				}
                return innerSearchHits;
			}).onErrorReturn(e -> {      			
				......
        		return null;
			}).subscribe(...
				}
			}, e -> { 
				if (!t.isUnsubscribed()) {
					t.onError(e);
				}
			}, () -> {
				if (!t.isUnsubscribed()) {
					t.onCompleted();
				}
			});
			
		}
	});

Same code is working fine, if I do remote debugging