So I'm trying to use Elastic Search, but am having some difficulties.
The latest one is, in code like this:
SearchRequestBuilder builder = client.prepareSearch(index); builder = builder.setSearchType(SearchType.DFS_QUERY_AND_FETCH); builder = builder.setQuery(new
builder = builder.setFrom(startIndex);
builder = builder.setSize(maxResults);
builder = builder.setExplain(true);
ListenableActionFuture future =
response = future.actionGet(MAX_WAIT_MILLIS);
SearchHits hits = response.getHits();
hits.getTotalHits() is some reasonable number
However, hits.getHits().length is always BIGGER than maxResults.
From the documentation, it looks like I"m supposed to just get, at
most, maxResults hits back, but I'm always getting more than that
Does anyone know why that might be happening? Am I doing something