Details

      Description

      The search portlet will throw the folling error when searching first for something that gives more than 50 results, then changing the results page and then changing the search term to someting that gives less than 50 results:
      ERROR [http-apr-80-exec-187][IncludeTag:154] com.liferay.portal.kernel.search.SearchException: java.lang.IllegalArgumentException: fromIndex(50) > toIndex(23)

      Steps to reproduce:
      1. Add the search portlet to any page
      2. Search for a term that will give 50-100 results or more (so pagination is visible)
      3. Click on "next" to see the fllowing results of the search
      4. Now change the search term to some other word that give 1 - 49 results (so no pagination would be visible) and click enter

      The search portlet will show just the input box with the new term but no results at all and you'll have that error in your logs.
      Seems like changes to the current search will just change the parameter that you have changed. Changing the term will set a new term for the current search but the pagination parameters stay the same and you'll get that error when the new term gives less results.

      Changing the search term should reset all other parameters as it would be a fresh search.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 13 weeks, 3 days ago