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: How to show customized result in search result portlet
Hi ,
I am using search bar to perform the search in my application. Result are getting displayed on Search Result portlet.I want to restrict the search to few select assets only. right now its showing everything even the js and css files from document and media.Same option we got in search portlet to configure the search scope using the configuration menu assets type. here we can set the assets type.
Please help to to configure the restricted search with help of search bar and result portlet.
Thanks-Amit
I am using search bar to perform the search in my application. Result are getting displayed on Search Result portlet.I want to restrict the search to few select assets only. right now its showing everything even the js and css files from document and media.Same option we got in search portlet to configure the search scope using the configuration menu assets type. here we can set the assets type.
Please help to to configure the restricted search with help of search bar and result portlet.
Thanks-Amit
Hi,
For searching only the restricted asset in search bar , You have add Type Facet Portlet and configure which all assets have to be searched.
For searching only the restricted asset in search bar , You have add Type Facet Portlet and configure which all assets have to be searched.
Thanks for your Answer this solve the problem
Unfortunately I don't think you can mark a document as "no searchable" like you can with Web Content -- something I have never understood to be honest.
I have in the past had a requirement from clients to allow searching of some files (extensions) but not others and the way we managed that was by adding custom boolean clauses to the search query before it was invoked. In Liferay you can do this with an IndexerPostProcessor. I'm not sure what version of the portal you are on but since you are refrencing the "search bar" I'll assume it's at least 7.1 in which case, maybe this will help: https://portal.liferay.dev/docs/7-1/reference/-/knowledge_base/r/indexer-post-processor
I have in the past had a requirement from clients to allow searching of some files (extensions) but not others and the way we managed that was by adding custom boolean clauses to the search query before it was invoked. In Liferay you can do this with an IndexerPostProcessor. I'm not sure what version of the portal you are on but since you are refrencing the "search bar" I'll assume it's at least 7.1 in which case, maybe this will help: https://portal.liferay.dev/docs/7-1/reference/-/knowledge_base/r/indexer-post-processor
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™