Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Search portlets
Hi,
I have some questions regarding the search:
The Web Content search seems to only include content that is actually put on some page.
If a Web Content is displayed e.g. only through the Asset publisher the Web Content search does not find those articles (yes, I did re-index everything).
But they are found when using the portal wide search instead (which makes it even more confusing for the user)
The "Search Portlet" (portal-wide) always searches in all portlets, even in disabled ones.
I'm not using Blogs, Wiki, Forum etc.
So: how can I control the portlets that are searched by the portal search? I want to restrict this to Web Content and Document Library
And how can I adjust the display of the search result?
(I guess I already know that answer: I need patch the Liferay source code
):
Making the results from the blog search the most prominent one is ridicolous. Web Content is a lot more important for an enterprise portal. The "result" for the blogs is even displayed when the portlet is disabled (leaving 3/4 of the page blank and the relevant search results are hidden in a tiny little "Web Content" result area.
I have some questions regarding the search:
The Web Content search seems to only include content that is actually put on some page.
If a Web Content is displayed e.g. only through the Asset publisher the Web Content search does not find those articles (yes, I did re-index everything).
But they are found when using the portal wide search instead (which makes it even more confusing for the user)
The "Search Portlet" (portal-wide) always searches in all portlets, even in disabled ones.
I'm not using Blogs, Wiki, Forum etc.
So: how can I control the portlets that are searched by the portal search? I want to restrict this to Web Content and Document Library
And how can I adjust the display of the search result?
(I guess I already know that answer: I need patch the Liferay source code
Making the results from the blog search the most prominent one is ridicolous. Web Content is a lot more important for an enterprise portal. The "result" for the blogs is even displayed when the portlet is disabled (leaving 3/4 of the page blank and the relevant search results are hidden in a tiny little "Web Content" result area.
1803863, modificat fa 16 anys.
Junior Member
Apunts: 83
Data d'incorporació: 18/12/08
Publicacions recents
Sigh.... patching Liferay source again
Thanks for the answer anyway
Thanks for the answer anyway
1803863, modificat fa 16 anys.
Junior Member
Apunts: 83
Data d'incorporació: 18/12/08
Publicacions recents
That is inevitable 
But as Victor and I have discussed in that post , it'll be good to have that level of customization in the serach portlet by default. As per your requirement its just commenting out few lines in the liferay-portlet.xml
Thanks & Regards
Parul Seth
But as Victor and I have discussed in that post , it'll be good to have that level of customization in the serach portlet by default. As per your requirement its just commenting out few lines in the liferay-portlet.xml
Thanks & Regards
Parul Seth
Just for the record:
My workaround is to change search.jsp and instead of
I'm manually adding the portlets I want to search:
Your suggestion to retrieve only the portlets used in the community:
did not work for me. With that code no search results were shown (seems that the list of portlets is empty in this case)
Unfortunately I hear that way too often.
Having to customize the portal by patching the source creates a maintenance nightmare when you want to upgrade to a new version.
My workaround is to change search.jsp and instead of
List portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), false, false);I'm manually adding the portlets I want to search:
List portlets = new ArrayList();
Portlet webContent = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), "15");
portlets.add(webContent);
Portlet docLib = PortletLocalServiceUtil.getPortletById(company.getCompanyId(), "20");
portlets.add(docLib);
Your suggestion to retrieve only the portlets used in the community:
LayoutTypePortlet layoutTypePortlet2 = (LayoutTypePortletImpl)layout.getLayoutType();
List portlets = layoutTypePortlet2.getPortlets();did not work for me. With that code no search results were shown (seems that the list of portlets is empty in this case)
Parul Seth:
That is inevitable
Unfortunately I hear that way too often.
Having to customize the portal by patching the source creates a maintenance nightmare when you want to upgrade to a new version.
1803863, modificat fa 16 anys.
Junior Member
Apunts: 83
Data d'incorporació: 18/12/08
Publicacions recents
Hi Thomas
Yes you can do that or as I said you can comment out the open search classes in liferay-portlet.xml, either ways it'll serve the purpose.
That works fine for me though.
Yeah that's very true and so we have been blessed by liferay with ext
Thanks & Regards
Parul Seth
Impetus Infotech (India) Pvt. Ltd.
Yes you can do that or as I said you can comment out the open search classes in liferay-portlet.xml, either ways it'll serve the purpose.
Your suggestion to retrieve only the portlets used in the community:
That works fine for me though.
Yeah that's very true and so we have been blessed by liferay with ext
Thanks & Regards
Parul Seth
Impetus Infotech (India) Pvt. Ltd.
But I still don't understand why the web content search produces a different result than the "global search".
I have a search box in my theme using $theme.journalContentSearch() and that does not find articles that are only shown through the asset publisher.
Using the "Search Portlet" those articles are found (and shown as part of the WebContent result), so why are they excluded in the web content search?
It makes upgrades a nightmare.
I'll go for a JSP hook which is still a nightmare but not as much as the ext environment
I have a search box in my theme using $theme.journalContentSearch() and that does not find articles that are only shown through the asset publisher.
Using the "Search Portlet" those articles are found (and shown as part of the WebContent result), so why are they excluded in the web content search?
blessed by liferay with extIt's more of a curse than a blessing.
It makes upgrades a nightmare.
I'll go for a JSP hook which is still a nightmare but not as much as the ext environment
478322, modificat fa 16 anys.
Regular Member
Apunts: 226
Data d'incorporació: 13/02/08
Publicacions recents
I guess this should solve your first problem
##
## Journal Content Search Portlet
##
#
# Set whether unlisted articles are excluded from search results.
#
journal.content.search.show.listed=true
Arvind Mishra:
I guess this should solve your first problemjournal.content.search.show.listed=true
Great, thanks.
Community
Company
Feedback