Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1382

SearchGenerator return has-previous false when meet the no. 2 page

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.6
    • None
    • Blocks: (Undefined)
    • None
    • Operating System: All
      Platform: All
    • 32728

    Description

      Using SearchGenerator,when come to page 2,has-previous is false,but after page
      2 it return true.The problem is cause by LuceneCocoonPager.java,method
      hasPrevious(),line 189:
      return hitsIndex > countOfHitsPerPage;
      Because index start with 0,the second page is 10 when 10/page,then 10>10 is
      false.
      Solution:
      change to return hitsIndex >= countOfHitsPerPage
      or make index start with 1,this is the better solution.

      Attachments

        Activity

          People

            Unassigned Unassigned
            roy_huang@nbmgroup.com roy huang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: