掲示板

Creating a New Facet - How To

12年前 に Jan Tošovský によって更新されました。

Creating a New Facet - How To

Liferay Master 投稿: 566 参加年月日: 10/07/22 最新の投稿
Dear All,

I'd like to refine the final search results using another facets.
Looking into the code I can see only the part of required changes:

1) updating the search portlet configuration (JSON string in advanced mode)
- displayStyle - asset_tags (template used for final HTML rendering)
- static - false
- weight - 1.3 (higher number, the higher position in the facets panel)
- order - OrderHitsDesc - (here I'd prefer alphabetical sorting, how to achieve this?)
- displayStyle - list (can be also cloud, but list is Ok)
- maxTerms - 10 (this value should be higher than maximum number of terms of a single document)
- frequencyThreshold - 1 (uclear to me)
- showAssetCount - true (self-descriptive)
- className - com.liferay.portal.kernel.search.facet.MultiValueFacet (versatile class)
- label - MyFacet
- fieldName - assetCategoryNames (most important, but unclear what to use here)

2) updating indexer ?
Probably new keywords will be needed. This postprocessing could be helpful.
http://www.liferay.com/web/jonas.yuan/blog/-/blogs/11643681

3) updating facets processing
This is completely unclear to me.

Could anybody explain all this? I haven't found any blog or wiki page on this topic yet.

Regards,
Jan
12年前 に Jan Tošovský によって更新されました。

RE: Creating a New Facet - How To (回答)

Liferay Master 投稿: 566 参加年月日: 10/07/22 最新の投稿
I got it!

ad 1) fieldName is the name of a field in the full-text index. If a new one is needed, it can be added using indexer postprocessor, see the link at point 2.
ad 3) nothing else is necessary to get it to work!

Thanks a lot for this great feature!!!

Jan