blurQueryRow.setCacheResult(false);
Selector selector = new Selector();
selector.setRecordOnly(true);
blurQueryRow.setSelector(selector);
BlurResults resultsRow = client.query(tableName, blurQueryRow);
long totalResults = resultsRow.getTotalResults();
assertEquals(numberOfDocs, resultsRow.getTotalResults());
String lastValue = null;
long totalFetched = 0;
do {
for (BlurResult blurResult : resultsRow.getResults()) {
FetchResult fetchResult = blurResult.getFetchResult();
Record record = fetchResult.getRecordResult().getRecord();
if (lastValue == null) {
lastValue = getColumnValue(record, "facet");
} else {
String currentValue = getColumnValue(record, "facet");
if (currentValue.compareTo(lastValue) < 0) {
fail("Current Value of [" + currentValue + "] can not be less than lastValue of [" + lastValue + "]");
}
lastValue = currentValue;
}
totalFetched++;
}
int size = resultsRow.getResults().size();
totalResults -= size;
if (totalResults > 0) {
blurQueryRow.setStart(blurQueryRow.getStart() + size);
resultsRow = client.query(tableName, blurQueryRow);
}