Permalink
Browse files

pagination fix

  • Loading branch information...
1 parent eae3ebb commit bedd1e764efcbb982f18525724e5ec6a2cc5775a @michelegonella committed Oct 25, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 zen-store/src/main/java/com/nominanuda/solr/DataImportHandlerWs.java
@@ -110,14 +110,15 @@ public HttpResponse handle(HttpRequest request) throws Exception {
}
}
}
+ int resLen = resultsArray.getLength();
DataArray deletedEntities = computeDeleted(cmd, type_, since, start, rows);
for (Object o : deletedEntities) {
DataObject obj = STRUCT.newObject();
obj.put(idField, FAKE_ID);
obj.put("deleteDocById", o.toString());
resultsArray.add(obj);
}
- if (resultsArray.getLength() >= rows || deletedEntities.getLength() >= rows) {
+ if (resLen >= rows || deletedEntities.getLength() >= rows) {
Integer nextStart = start + rows;
DataObject hasMore = resultsArray.addNewObject();
hasMore.put(idField, "1");

0 comments on commit bedd1e7

Please sign in to comment.