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
Search Portlet: Page scope filter in forum search (Not filtered)
Hi Team,
I have message board portlet (forums) added on two different private pages (belongs to same site).
One page (p1) has scope as default scope (i.e. current site scope) & another page (p2) has current page scope (newly created from portlet configuration)
I have added seach portlet on both the pages and I want to search only forum messages based on scope selected.
Also, while creating a new thread on two different pages are not same.
Now from index, scopeGroupId is the field which differentiates the messages based on scope. (Site & page)
My requirement is to search forum messages based on the page user has opened. Message of p1 page should not be searched on page p2.
In LR 7.0, I am able to add my custom filter for scopeGroupId to search forum thread messages in FacetedSearcherImpl class (class was overriden)
But in LR 7.1, It is not the case. I cannot override same class as it is now not available to override.
So, records belong to only site scope is returned in both the pages.
Actually it should not display site forum messages to page p2 (page scope)
There are several contributors provided by Liferay in v7.1 to add those custom filter while search is performed.
I have tried few of them like QueryPreFilterContributor class & ModelPreFilterContributor class for MBMessage, but didn't get any success.
Any other way to achieve this ?
- Bhavik
Attachments:
You mentioned about you added, search portlet to both the pages. which one from the below list - do you mean search bar or the search under tools category?
Powered by Liferay™