Skip to content
Snippets Groups Projects
Commit 86770985 authored by Thorsten Vitt's avatar Thorsten Vitt
Browse files

Fixed search export limits

parent 5f3c4c05
No related branches found
No related tags found
No related merge requests found
......@@ -180,9 +180,9 @@ protected void initFromSearch(final String query, final String target, int start
Builder<ObjectType> objects = ImmutableList.<ObjectType>builder();
Builder<URI> uris = ImmutableList.<URI>builder();
do {
response = searchClient.query(query, null, "", start, Math.max(stop-start, 1000));
response = searchClient.query(query, null, "", start, Math.min(stop-start, 1000));
hits = Integer.parseInt(response.getHits());
stop = Math.max(stop, hits);
stop = Math.min(stop, hits);
for (ResultType result : response.getResult()) {
start += 1;
objects.add(result.getObject());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment