Faceted Search: categories are displayed twice

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

1
  • 10 Jul 2012, 09:55 AM

Activity

Show:

Luyang Tan July 23, 2012 at 11:12 PM

PASSED Manual Testing following the steps in the description.

Reproduced on:
Tomcat 7.0 + MySQL 5. Portal 6.1.0 CE GA1.

The results view displays the categories twice.

Fixed on:
Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 54d7ed0f39b755b1667d62670204d83473c7e832.
Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 17beffddf4745ebeb41488a652603f603d2ec48f.

The results view displays the categories only once.

Michael Saechang July 16, 2012 at 2:27 PM

Committed on:
Portal 6.1.x CE GIT ID: e6dac2def2ef79e9071554740bf20b9bd6182ad0.
Portal 6.2.x GIT ID: 73a7c13d0a58aa3a7ebc730914c5526ad20d5308.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Branch Version/s

6.1.x

Backported to Branch

Committed

Priority

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