Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Peter Hellstrand
Really stuck on custom search portlet. (make it search in knowledgebase)
July 14, 2012 1:14 PM
Answer

Peter Hellstrand

Rank: Regular Member

Posts: 167

Join Date: November 30, 2011

Recent Posts

Is it possible to mke the search portlet search for Knowledgebase articles?

I have tried adding it to the advanced configuration of search portlet.

 1
 2{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet', data: {frequencyThreshold: 1, values: [
 3
 4'com.liferay.portlet.bookmarks.model.BookmarksEntry',
 5'com.liferay.portlet.blogs.model.BlogsEntry',
 6'com.liferay.portlet.calendar.model.CalEvent',
 7'com.liferay.portlet.documentlibrary.model.DLFileEntry',
 8'com.liferay.portlet.journal.model.JournalArticle',
 9'com.liferay.portlet.messageboards.model.MBMessage',
10'com.liferay.portlet.wiki.model.WikiPage',
11'com.liferay.portal.model.User',
12[b]'com.liferay.knowledgebase.model.Article'[/b]
13
14
15]}, displayStyle: 'asset_entries', fieldName: 'entryClassName', label: 'asset-type', order: 'OrderHitsDesc', static: false, weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', data: {displayStyle: 'list', frequencyThreshold: 1, maxTerms: 10, showAssetCount: true}, displayStyle: 'asset_tags', fieldName: 'assetTagNames', label: 'tag', order: 'OrderHitsDesc', static: false, weight: 1.4},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', data: {displayStyle: 'list', frequencyThreshold: 1, maxTerms: 10, showAssetCount: true}, displayStyle: 'asset_tags', fieldName: 'assetCategoryNames', label: 'category', order: 'OrderHitsDesc', static: false, weight: 1.3},{className: 'com.liferay.portal.kernel.search.facet.RangeFacet', data: {frequencyThreshold: 1, ranges: [{label:'modified', range:'[19700101000000 TO *]'}]}, displayStyle: 'modified', fieldName: 'modified', label: 'modified', order: 'OrderHitsDesc', static: false, weight: 1.1}]}



I have checked these possibilities in portal-ext.properties. Is knowledgebase articles unsupported. What to do?

1com.liferay.portlet.blogs.util.BlogsOpenSearchImpl=true
2com.liferay.portlet.bookmarks.util.BookmarksOpenSearchImpl=true
3com.liferay.portlet.calendar.util.CalendarOpenSearchImpl=true
4com.liferay.portlet.directory.util.DirectoryOpenSearchImpl=true
5com.liferay.portlet.documentlibrary.util.DLOpenSearchImpl=true
6com.liferay.portlet.journal.util.JournalOpenSearchImpl=true
7com.liferay.portlet.messageboards.util.MBOpenSearchImpl=true
8com.liferay.portlet.wiki.util.WikiOpenSearchImpl=true
Jan Geißler
RE: Really stuck on custom search portlet. (make it search in knowledgebase
July 14, 2012 1:28 PM
Answer

Jan Geißler

Community Moderator

Rank: Liferay Master

Posts: 735

Join Date: July 5, 2011

Recent Posts

knowledge-base-portlet is a seperate portlet, and not located in the portal.
So I would guess, that there is no OpenSearch Provider for that particular portlet?

If so, you would have to implement this yourself.

So long
Jan
Peter Hellstrand
RE: Really stuck on custom search portlet. (make it search in knowledgebase
July 14, 2012 10:38 PM
Answer

Peter Hellstrand

Rank: Regular Member

Posts: 167

Join Date: November 30, 2011

Recent Posts

Thank you
Jelmer Kuperus
RE: Really stuck on custom search portlet. (make it search in knowledgebase
July 15, 2012 2:24 AM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

There is an indexer registered in it's liferay-portlet.xml file

try using

com.liferay.knowledgebase.model.KBArticle

instead of

com.liferay.knowledgebase.model.Article
Peter Hellstrand
RE: Really stuck on custom search portlet. (make it search in knowledgebase
July 15, 2012 3:04 AM
Answer

Peter Hellstrand

Rank: Regular Member

Posts: 167

Join Date: November 30, 2011

Recent Posts

You saved me. Did not sleep tonight because of this.
Peter Hellstrand
RE: Really stuck on custom search portlet. (make it search in knowledgebase
July 15, 2012 4:22 AM
Answer

Peter Hellstrand

Rank: Regular Member

Posts: 167

Join Date: November 30, 2011

Recent Posts

Can $theme.search() be customized this way?