Changeset 30149


Ignore:
Timestamp:
08/31/15 14:33:37 (5 years ago)
Author:
kjdon
Message:

making start_results always start at 0, as sometimes it was 1, sometimes it was 0, and it was too confusing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/util/SolrQueryWrapper.java

    r30057 r30149  
    350350        solrQuery.addSort(this.sort_field, SolrQuery.ORDER.valueOf(this.sort_order)); // sort param, like "score desc" or "byORG asc"
    351351        solrQuery.setStart(start_results); // which result to start from
    352         solrQuery.setRows((end_results - start_results) + 1); // how many results per "page"
     352        solrQuery.setRows(end_results - start_results); // how many results per "page"
    353353
    354354        // http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-td4084510.html
     
    574574    }
    575575
    576     //Greenstone universe operates with a base of 1 for "start_results"
    577     //But Solr operates from 0
     576  // start results always from 0
    578577    public void setStartResults(int start_results)
    579578    {
     
    582581            start_results = 0;
    583582        }
    584         this.start_results = start_results - 1;
     583        this.start_results = start_results;
    585584    }
    586585
Note: See TracChangeset for help on using the changeset viewer.