Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
Luyang TanLuyang Tan(Deactivated)Reporter
Alberto ChaparroAlberto ChaparroLabels
Branch Version/s
6.1.xBackported to Branch
CommittedGit Pull Request
Components
Affects versions
Priority
Medium
Details
Details
Assignee
Luyang Tan
Luyang Tan(Deactivated)Reporter
Alberto Chaparro
Alberto ChaparroLabels
Branch Version/s
6.1.x
Backported to Branch
Committed
Git Pull Request
Components
Affects versions
Priority
Zendesk Support
Zendesk Support
Zendesk Support
Created July 10, 2012 at 9:55 AM
Updated June 24, 2023 at 3:53 PM
Resolved July 11, 2012 at 11:35 AM
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()});