Skip to content

Commit

Permalink
fixed backup method should not use search, but should directly read f…
Browse files Browse the repository at this point in the history
…rom DB instead
  • Loading branch information
albogdano committed Nov 22, 2021
1 parent 5c6db67 commit c5e5835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions para-server/src/main/java/com/erudika/para/rest/Api1.java
Original file line number Diff line number Diff line change
Expand Up @@ -998,10 +998,10 @@ public void write(OutputStream os) throws IOException, WebApplicationException {
long count = 0;
int partNum = 0;
// find all objects even if there are more than 10000 users in the system
Pager pager = new Pager(1, "_docid", false, Config.MAX_ITEMS_PER_PAGE);
Pager pager = new Pager();
List<ParaObject> objects;
do {
objects = getSearch().findQuery(app.getAppIdentifier(), "", "*", pager);
objects = getDAO().readPage(app.getAppIdentifier(), pager);
ZipEntry zipEntry = new ZipEntry(fileName + "_part" + (++partNum) + ".json");
zipOut.putNextEntry(zipEntry);
writer.writeValue(zipOut, objects);
Expand Down

0 comments on commit c5e5835

Please sign in to comment.