Foros de discusión

Search format for portlets

ma bu, modificado hace 13 años.

Search format for portlets

Junior Member Mensajes: 31 Fecha de incorporación: 14/05/10 Mensajes recientes
Hi there,
maybe my question is too easy but at the moment I'm stuck on it.
What I want to do is to extend the search results in my portal. By default it is possible to search within the portal. My idea is to add a web-service like googleBookSearch to get results from there as well.
I already created a portlet which reacts on the regular search. The search item will be forwarded to the web-service and results will come back.

This works fine so far, but is there a special format I have to use in order to make the results appear in the search portlet?

Thanks in advance
Shreyas Atre, modificado hace 13 años.

RE: Search format for portlets

New Member Mensajes: 5 Fecha de incorporación: 13/07/10 Mensajes recientes
Hi,

Which Liferay are you using? Are you using Search Container? Where do your returning results reside? Please provide more details.

In any case, you might want to store the resultset in a database and retrieve it normally in your search portlet.

Regards.
ma bu, modificado hace 13 años.

RE: Search format for portlets

Junior Member Mensajes: 31 Fecha de incorporación: 14/05/10 Mensajes recientes
Hi,

Sorry for the missing input.
I'm using Liferay 6 bundled with Tomcat.
In Liferay there exists a serach portlet by default to search in forum, wiki,
web content, etc.
The results I get from the web service should appear in here as well as the other results maybe as a separate category.
E.g.
Forum
entry
entry...

Wiki
entry
entry...

GoogleBookSearch
entry
entry...

Cheers
ma bu, modificado hace 13 años.

RE: Search format for portlets

Junior Member Mensajes: 31 Fecha de incorporación: 14/05/10 Mensajes recientes
Hi everybody!

Maybe my question is a bit confusing (in considering of the feedback it has to be emoticon )
So I try to explain my problem in a better way.

First of all: I'm using Liferay 6 bundled with Tomcat.
What I want to do is to extend the standard portal search in order to get access to webservices. The results should appear next to the other results. But step by step.

Until now I created a Liferay Portlet that implements OpenSearch. So everytime I start
a search with the standard component/app Seach (Application-Tools-Search) my own portlet
is reacting as well. My portlet picks up the search term and forwards it to a webservice
(e.g. GoogleBookSearch/YahooSearch!) From there I get a response, a XML structure in
RSS/ATOM/OpenSearch format. Everything is fine so far.

In the 'old' Liferay version (5.x.x) these results appeared in the 'regular result table'
as well as the other search results from web content, forum or wiki entries. But in
Liferay 6 this dosn't work any more this way.

What I want is now that the results from the webservice appear in the regular result table
as an own category, like:

Forum (1)
Test
Test Reilly test

Blogs (1)
Reilly
Test blog blog

MyOwnPortlet
O'Reilly Media
Offers a variety of publications which summarize specific software applications, web platforms, operating systems, and more....

Does anybody know what I have to do to make the results from the webservice appear?
Do I have to use a special format or anything other special?

Thanks in advance
ma bu, modificado hace 13 años.

RE: Search format for portlets

Junior Member Mensajes: 31 Fecha de incorporación: 14/05/10 Mensajes recientes
Hello everybody,
until now I found out, that it isn't possible to just get a valid ATOM/RSS-Feed-String captured by the search function.
What I found out is that the format isn't correct so the results don't appear in the search result set.
The problem is that there are some elements within the XML missing. For a valid result set (in Liferay) every entry has to contain the following elements: 'title', 'link', 'summary' and 'tags'. If one of these elements is missing the result won't appear in the regular search result set.

What I didn't found out yet is wheater it is a bug in Liferay or not.

Cheers