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 Tuning Synonyms API is not available in Liferay 7.2 DXP SP3
Hi,
I have a requirement to customize search tuning Synonyms and Result Ranking. Need to add afeature to import synonyms through excel, But i am unable to find Search Tuning Synonyms API in Liferay 7.2 DXP SP 3. Please help me here. Is there any other way to do this.
Hi Sumanth, 7.2 is up to SP8. I've just downloaded the source for SP8
and I see
modules/dxp/apps/portal-search-tuning/portal-search-tuning-web-api
.
I haven't browsed further than that, but can you clarify what you're missing?
Edited to add: I see what you mean, there's really no API in that module. And that reminds me, in 7.2 the search tuning apps like synonyms were stored entirely in their index: something like liferay-20101-search-tuning-synonyms is what it's called. I'm not sure how much extending you can do, but hopefully that helps get you closer to what you need.
Hi Russell,
Thank you for the reply.
We are using Liferay 7.2.10 DXP SP3.
I followed 1 approach. We have Liferay Foundation - Liferay Search Tuning - Impl.lpkg file in server osgi/marketplace folder. I have extracted it and found the com.liferay.portal.search.tuning.synonyms.web-1.0.18.jar file, i have extracted that jar and modified MANIFEST.MF file and just added Export-Package : {added required pakages} and then againg conveted that to JAR file and placed in osgi/marketplace/overrid folder and started the server. This time i am able to acceess those pakages in my customg MVCActionCommand class and it is working as expected. But i feel that modifing the MANIFEST.MF file of original jar is not a good practice and if we have the source then will do make changes in the source.
Hi Sumanth, if what you need is to access some unexported packages (like internal packages) then you could use a fragment module I think, and export them from the bnd.bnd just like you're doing from the JAR.
It's a bit of a brittle approach, and you'll be exporting packages that weren't intended to be extended and letting anyone else that's deploying code to the runtime can also use these packages. But it's certainly better than cracking open the LPKG I think.
Hi Russell,
Thank you for the replay.
I have already overrided frgamnet module approach for JSP override of Synonym set home page, But earliar i din't mentioned Export-packages: {Required packages}. But now i have mentoned all required packages in my fragment module, now it is working as expected. I will retest/recheck my functionality.
Thank you Russell for the idea.
Powered by Liferay™