I will suggest you to check the implementation of the facets in search.
For a quick management of your custom attribute to behave like tags and category facets,
- open the configuration of search portlet
- select the advance mode
- change the json format setting and add following to the facets:
{
"displayStyle": "asset_tags",
"static": false,
"weight": 1.6,
"order": "OrderHitsDesc",
"data": {
"displayStyle": "list",
"maxTerms": 10,
"frequencyThreshold": 1,
"showAssetCount": true
},
"className": "com.liferay.portal.kernel.search.facet.MultiValueFacet",
"label": "expando",
"fieldName": "expando/custom_fields/custom_field"
}
here custom_field should be your custom field name.
Now when you will search "for ex if you search for test"; then a facet block will appear 'Any expando, etc'
Similarly you can check this implementation in search portlet to tune it for your need.
Please sign in to flag this as inappropriate.