mirror of https://github.com/apache/lucene.git
Default number of rows to 10 if not specified. Fixes issue with calculation of number of pages
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@755993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b46fca3934
commit
c26c959710
|
@ -21,7 +21,7 @@ import org.apache.solr.search.DocSlice;
|
|||
|
||||
public class PageTool {
|
||||
private long start;
|
||||
private int results_per_page;
|
||||
private int results_per_page = 10;
|
||||
private long results_found;
|
||||
private int page_count;
|
||||
private int current_page_number;
|
||||
|
@ -29,8 +29,9 @@ public class PageTool {
|
|||
public PageTool(SolrQueryRequest request, SolrQueryResponse response) {
|
||||
String rows = request.getParams().get("rows");
|
||||
|
||||
if (rows != null)
|
||||
if (rows != null) {
|
||||
results_per_page = new Integer(rows);
|
||||
}
|
||||
|
||||
DocSlice doc_slice = (DocSlice) response.getValues().get("response");
|
||||
|
||||
|
|
Loading…
Reference in New Issue