Fórum

Custom search portlet

Pandel suslo, modificado 9 Anos atrás.

Custom search portlet

New Member Postagens: 6 Data de Entrada: 24/08/14 Postagens Recentes
Hello,

I am beginner in liferay and I don't find how to create a custom search portlet for my asssetPublisher.
Please do you have some tutorial or advice to help me .

Regards.
thumbnail
Andew Jardine, modificado 9 Anos atrás.

RE: Custom search portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hi Pandel,

What specifically are you looking to customize? if its just the way the results look then it might be easier than you think. Can you elaborate on what exactly you want to do? (and include the version of Liferay you are using -- depending on your answer, it might matter emoticon )
Pandel suslo, modificado 9 Anos atrás.

RE: Custom search portlet

New Member Postagens: 6 Data de Entrada: 24/08/14 Postagens Recentes
hello,
I use liferay 6.2 ce ga2 , and I have an asset publisher that shows my web content with my personal structure (text, html, image). I want to create a personalized search engine that searches in my asset publisher. The search engine must contain three fields: title, content, date.
I don't know what to do ! If I should create a new portlet how I can access to my web content with my personal structure?
thank you for your cooperation.
Pandel suslo, modificado 9 Anos atrás.

RE: Custom search portlet

New Member Postagens: 6 Data de Entrada: 24/08/14 Postagens Recentes
who can help me please !!
thumbnail
Andew Jardine, modificado 9 Anos atrás.

RE: Custom search portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hey Pandel,

Sounds to me like what you want to do is build your own portlet and leverage the portions of the API that Liferay exposes to make queries to Lucene. You can see an example of how to start (making the changes you need along the way of course) here: http://liferaytutorial.blogspot.ca/2013/08/liferay-boolean-query-for-searching.html
Pandel suslo, modificado 9 Anos atrás.

RE: Custom search portlet

New Member Postagens: 6 Data de Entrada: 24/08/14 Postagens Recentes
Hi,
thank you for your help.
Can you give me a tutorial or a documentation that explains how to do that ?! it's not clear for me how to connet my jsp file with liferay and with lucene !
I am a beginner in liferay and I can not find enough tutorial for portlet developing.
thank you again
Regards
thumbnail
Andew Jardine, modificado 9 Anos atrás.

RE: Custom search portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hey Pandel,

The link I sent over in my last post should be enough for you to get started. If you create a basic Liferay portlet project and then in the JSP start coding for your queries inside a scriptlet (<% //your code here %>) then that should get you going. I would start with a specific search that you want to perform using keywords that you know will produce results and hard code them (in the jsp) as the search terms. Once you know the code is working you can moving it to an action handler in a custom portlet class.

If you have never developed a portlet before, then you should probably start with something simpler than trying to create a custom search portlet. Here is a link to Liferay developers guide: https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/developing-portlet-applications-liferay-portal-6-2-dev-guide-03-en

Also, I would consider downloading the portal source (it is free afterall) and reading it to understand how Liferay tackles these things. There are after all two Search portlets that come bundled with Liferay -- they make for great examples to learn from.
Pandel suslo, modificado 9 Anos atrás.

RE: Custom search portlet

New Member Postagens: 6 Data de Entrada: 24/08/14 Postagens Recentes
Hello
thank you this is very helpful for me.