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

Faceted Search: categories are displayed twice

    Details

      Description

      Trying to configure the search portlet to display the categories as facets, the search view shows the categories twice (see attached image).

      Steps to reproduce:
      1. Create a vocabulary
      2. Create 2 categories inside that vocabulary
      3. Drag and drop search portlet on any page
      4. Go to configuration (search portlet)
      5. Select Advance in the Display Settings section
      6. Paste the following JSON text in the Search Configuration text box to set categories as facets:
      {"facets": [{
      "displayStyle": "asset_vocabulary",
      "weight": 1.3,
      "static": false,
      "order": "OrderHitsDesc",
      "data":

      { "maxTerms": 10, "displayStyle": "list", "frequencyThreshold": 1 }

      ,
      "label": "category",
      "className": "com.liferay.portal.kernel.search.facet.MultiValueFacet",
      "fieldName": "assetCategoryIds"
      }]}

      7. Search by any word

      The results view displays the categories twice.

      Technical Comment: in the portal-web/docroot/html/portlet/search/facets/asset_vocabulary.jsp file (the selected display style)
      we are getting the vocabularies twice if the scope and parent groups are the same:
      assetVocabularies = AssetVocabularyServiceUtil.getGroupsVocabularies(new long[]

      {themeDisplay.getScopeGroupId(), themeDisplay.getParentGroupId()}

      );

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              luyang.tan Luyang Tan (Inactive)
              Reporter:
              alberto.chaparro Alberto Chaparro
              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:
                9 years, 2 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2