Fórum

content search

Rhina Karr, modificado 11 Anos atrás.

content search

Junior Member Postagens: 86 Data de Entrada: 02/11/10 Postagens Recentes
Hi,
Is there an option to search a text (keyword) in only those webcontents of a site, which are linked to the portal pages of that site? I mean if there are webcontents which are not associated with a portal page, those webcontents will not be searched.
I am trying to use Liferay's search portlet in 6.1 version.

Thanks,
RK
thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

RE: content search

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
You can explore functionality of web content search portlet .
Its displaying search result only for those content which has been configured on that page.
thumbnail
Pinkesh Gandhi, modificado 11 Anos atrás.

RE: content search

Junior Member Postagens: 99 Data de Entrada: 27/01/12 Postagens Recentes
Hi Rhina,

In Liferay Search Portlet, such kind of provision is already provided out of the box. There is one combobox available, just adjacent to the search text-box in search portlet, and in that combobox there are two options available (1) Everything (2) This Site.
So if you want the webcontents associated only with the current site, then before searching you need to select second option from the combobox that is "This Site" and then try to search.

Hope this will help you.
thumbnail
Paul ., modificado 11 Anos atrás.

RE: content search

Liferay Master Postagens: 522 Data de Entrada: 29/08/11 Postagens Recentes
Yes, but it's limited to web content display portlet by using the web content search portlet and not the global one.
If you want to have that in global one, modify it with the query that is generated when search in 'web content search' portlet.

Add 'web content search' portlet and check it's configuration.
Rhina Karr, modificado 11 Anos atrás.

RE: content search

Junior Member Postagens: 86 Data de Entrada: 02/11/10 Postagens Recentes
Ok. Thanks for all your replies. I think I should elaborate the requirement. Here is the requirement:

1. If I use Liferay's search portlet, it returns list of wecontents which have the keyword. I want the list of pages which have those webcontents associated with them.
2. I have a site containing multiple pages. Different pages have different webcontents associated with them. There are some permissions defined on the pages. e.g. Page1 is viweable by role1, page2 is viewable by role2 etc.
Now suppose a user "A" has role1. He logs into the portal and search for a keyword which is in a webcontent associated with Page2. Since User "A" doesn't have permission to view Page2, so the seach result should not return Page2.

Thanks for help!!!

RK
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: content search

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
2. I have a site containing multiple pages. Different pages have different webcontents associated with them. There are some permissions defined on the pages. e.g. Page1 is viweable by role1, page2 is viewable by role2 etc.
Now suppose a user "A" has role1. He logs into the portal and search for a keyword which is in a webcontent associated with Page2. Since User "A" doesn't have permission to view Page2, so the seach result should not return Page2.


Should do this by default. If it doesn't, it's a bug.

1. If I use Liferay's search portlet, it returns list of wecontents which have the keyword. I want the list of pages which have those webcontents associated with them.


Do you have 1 web content per page? Links in the search portlet is to the web content instead of to a page. You'll have to modify liferay so it'll link to a page instead of to the web content. I've done this for my document system so the page will display with navigation bars.
Rhina Karr, modificado 11 Anos atrás.

RE: content search

Junior Member Postagens: 86 Data de Entrada: 02/11/10 Postagens Recentes
Hi Hitoshi,

Thanks for your reply. In our site a webcontent is associated with only one page. So can you tell me which Liferay API should I use to get the pages(or link of pages) containing the resulting webcontents.

Thanks,
RK
Rhina Karr, modificado 11 Anos atrás.

RE: content search

Junior Member Postagens: 86 Data de Entrada: 02/11/10 Postagens Recentes
Hi,

From a user's point of view, when he login into a site, on searching a keyword should return him links for pages (instead of webcontents), because a user doesn't know about webcontents. He only wants what are the pages which contain the keyword.

Thanks,
RK
thumbnail
Sayandip Ghosh, modificado 11 Anos atrás.

RE: content search

New Member Postagens: 11 Data de Entrada: 23/06/11 Postagens Recentes
Hi,

I guess it's quite a late reply for this thread. this can be achieved using a hook. Need to change inside main_search_result_form.jsp.

Sayandip.