Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rahul Pande
Implement OpenSearch in custom portlet
August 9, 2012 5:17 AM
Answer

Rahul Pande

Rank: Expert

Posts: 289

Join Date: July 6, 2010

Recent Posts

Hi All,

I have created a custom portlet using service builder to generate service classes for my custom entity.
I want to implement search capabilities for this portlet as well as this portlet should be searched from Default SEARCH portlet.
I am using Liferay 6.0.6 CE.

As Liferay is using open search for searching in different portlet, I want to enable my portlet for OpenSearch as well.

By reading some blogs for implementation of OpenSearch in custom portlet I have created following things.

1. Indexer for my custom entity
2. Created a class by extending HitsOpenSearchImpl for open search implementation
3. Added entry of this class in liferay-portlet.xml

Still my custom portlet is not searchable from search portlet.

Can anybody tell where I am going wrong. Any working sample example will be really helpful.

Thanks
Rahul
Navin Singh
RE: Implement OpenSearch in custom portlet
September 7, 2012 6:04 PM
Answer

Navin Singh

Rank: New Member

Posts: 8

Join Date: November 14, 2011

Recent Posts

Hello Rahul,

Were you able to fix the issue that you were facing? I would appreciate if you can write some steps how you achieve that?
Upendra Nath
RE: Implement OpenSearch in custom portlet
June 19, 2013 11:45 PM
Answer

Upendra Nath

Rank: New Member

Posts: 4

Join Date: June 19, 2013

Recent Posts

HI Rahul, any luck ??..
Oliver Bayer
RE: Implement OpenSearch in custom portlet
June 20, 2013 1:35 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 878

Join Date: February 18, 2009

Recent Posts

Hi Rahul,

your steps seems to be right but just to be sure: do you add both classes in the "liferay-portlet.xml (or liferay-portlet-ext.xml)"? The next step would be to add breakpoints to your classes to see if they are getting called. With the tool "luke" you can check the lucene index to see if your custom content is indexed actually. If not debug your indexer class further. If so check if your custom search class is getting called.

HTH Oli