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

Selecting a range with 0 results prevents correct rendering of range facets

    Details

      Description

      Reproduction Steps:

      1. Add a Search Portlet to a page
      2. Go to the Search Portlet's configuration and choose Advanced below Display Settings
      3. Add the following Search Configuration instead of the default:
         {"facets": [{
            "displayStyle": "range",
            "fieldName": "companyId",
            "static": false,
            "data": {
                "ranges": [
                    {
                        "range": "[0 TO 1]",
                        "label": "a"
                    },
                    {
                        "range": "[2 TO 3]",
                        "label": "b"
                    }
                ],
                "frequencyThreshold": 0
            },
            "weight": 1.1,
            "className": "com.liferay.portal.kernel.search.facet.RangeFacet",
            "label": "any-label",
            "order": "OrderHitsDesc"
        }]} 
      4. Search for test
      5. Click on "b"

      Experienced behavior: The facet values are not displayed at the left. b isn't displayed above Any Range and you don't have the chance to remove it
      Expected behavior: At the left both a and b should be displayed, b value should be displayed as selected, and above Any Range b should be displayed with the chance to remove it. Basically, everything should be displayed as in the case if you clicked on "a", even if in this case no results were found.

      Trunk is not affected as range.jsp was removed by LPS-54471, so "range" is not a valid display style there.

        Attachments

        1. Fixed.PNG
          Fixed.PNG
          23 kB
        2. Fixed61.PNG
          Fixed61.PNG
          23 kB
        3. Reproduced.PNG
          Reproduced.PNG
          14 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 28 weeks, 4 days ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.4 CE GA5
                  6.2.X EE