Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-32107

Make Custom Range inclusive in Search portlet to prevent IllegalArgumentException thrown by RangeFacet

    Details

      Description

      Search portlet is not ready to handle SearchException thrown by FacatedSearcher, but these exceptions appear in the log. e.g.

      Issue
      1. Search for anything in the Search portlet.
      2. Click on "Custom Range..." and pick-up the same day for the From and To fields.
      As a result the search settings and results disappear but the user receives no feedback in the UI, but "java.lang.IllegalArgumentException: End value must be greater than start value" appears in the log.

      Stack trace
      14:55:14,168 ERROR [com.liferay.taglib.util.IncludeTag:154] com.liferay.portal.kernel.search.SearchException: java.lang.IllegalArgumentException: End value must be greater than start value
      at com.liferay.portal.kernel.search.FacetedSearcher.search(FacetedSearcher.java:106)
      at org.apache.jsp.html.portlet.search.search_jsp._jspService(search_jsp.java:1103)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:97)
      at com.liferay.portal.servlet.PACLRequestDispatcherWrapper.doDispatch(PACLRequestDispatcherWrapper.java:90)
      at com.liferay.portal.servlet.PACLRequestDispatcherWrapper.include(PACLRequestDispatcherWrapper.java:54)
      at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:345)
      at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:245)
      at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:86)
      at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:3762)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      Caused by: java.lang.IllegalArgumentException: End value must be greater than start value
      at com.liferay.portal.kernel.search.facet.RangeFacet.doGetFacetClause(RangeFacet.java:83)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              luyang.tan Luyang Tan (Inactive)
              Reporter:
              tibor.lipusz Tibor Lipusz
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 8 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.30 EE GA3
                  6.2.0 CE M4