Fórum

Liferay DXP and Solr

thumbnail
Ilenia Zedda, modificado 7 Anos atrás.

Liferay DXP and Solr

New Member Postagens: 16 Data de Entrada: 28/05/15 Postagens Recentes
Hi,
I'm trying to configure liferay-dxp-digital-enterprise-7.0-ga1 to use Solr 5.5.

I've added the com.liferay.portal.search.solr-2.0.2.jar (from https://repository.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.portal.search.solr/2.0.2/) into liferay-dxp-digital-enterprise-7.0-ga1/osgi/portal
Also added the file 'com.liferay.portal.search.solr.configuration.SolrConfiguration-default.cfg' to liferay-dxp-digital-enterprise-7.0-ga1/osgi/configs

When I start the Liferay server no exceptions in the logs, and the module 'Liferay Portal Search Solr (2.0.2)' is active.
In control panel - System settings - I can see the solr options.

Doing a full reindex doesn't send anything to solr.

Did I miss some config step?

(Same steps worked fine with the CE version liferay-portal-tomcat-7.0-ce-ga1-20160331161017956 using the right solr.jar )

Thanks,
Ilenia
thumbnail
Ilenia Zedda, modificado 7 Anos atrás.

RE: Liferay DXP and Solr (Resposta)

New Member Postagens: 16 Data de Entrada: 28/05/15 Postagens Recentes
All the steps above are correct but there is an issue with DXP 7.0-ga1 that on server restart the search configuration is lost.

So for now after each restart need to remove the elastic search module and reconfigure the solr urls in Control Panel - System Settings - Foundation - SOLR
thumbnail
Gaurav Jain, modificado 7 Anos atrás.

RE: Liferay DXP and Solr

Junior Member Postagens: 85 Data de Entrada: 12/07/16 Postagens Recentes
Hi Ilenia Zedda,

I am using Liferay DXP Digital Enterprise 7.0.10 GA1 (Wilberforce / Build 7010 / June 15, 2016) and trying to configure SOLR 5.2. For this I followed steps specified by you in first post of this thread. But I am not able to locate Solr in my active bundles (neither in lb at gogo nor in Control Panel:>App Manager).

there is no any error log on console.

I want to make one thing clear that I am deactivating elastic search from Control Panel:>App Manager. Because com.liferay.portal.search.elasticsearch module is not present inside [LIFERAY_HOME]/osgi/portal.

How can I configure solr with liferay DXP?

Thanks,
Gaurav
thumbnail
Ilenia Zedda, modificado 7 Anos atrás.

RE: Liferay DXP and Solr

New Member Postagens: 16 Data de Entrada: 28/05/15 Postagens Recentes
Hi Gaurav,
there was an error in the steps above.
If you get the latest solr jar (now version 2.0.6 https://repository.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.portal.search.solr/2.0.6/) and just copy it into your deploy folder, you'll see that the jar will be placed in the /osgi/modules folder.
Once you have deployed the solr jar, you'll see it in control panel - system settings- foudation (search for SOLR or go to page 3 where you can find the 3 solr config options).

Also it seems like there is no need to disable elastic search to activate solr, but just need to refresh the solr module from gogo shell after each restart.
thumbnail
Jorge Díaz, modificado 7 Anos atrás.

RE: Liferay DXP and Solr (Resposta)

Liferay Master Postagens: 753 Data de Entrada: 09/01/14 Postagens Recentes
In case of using SOLR, about the problem of Elasticsearch module is activated after every reboot, it is a known issue, see:
- https://issues.liferay.com/browse/LPS-66692

This bug was resolved in Liferay comunity at release 7.0 GA3.
In Liferay DXP (enterprise), it was resolved in Fixpack 1.

So in case you are using Liferay 7 comunity, you should upgrade to latest released 7.0 GA3.
In case you are using Liferay DXP, install Fixpack 1 or newer
thumbnail
Gaurav Jain, modificado 7 Anos atrás.

RE: Liferay DXP and Solr

Junior Member Postagens: 85 Data de Entrada: 12/07/16 Postagens Recentes
Thanks Ilenia and Jorge for your prompt responses.

Now I have successfully configured the solr 5.2.1. Everything is nice and Ok. But On reindexing all search indexes at the end of reindexing an error was logged which is:

11:50:04,061 WARN [liferay/search_writer/SYSTEM_ENGINE-5][ProxyMessageListener:84] com.liferay.portal.kernel.search.SearchException: Error from server at http://localhost:8983/solr/liferay: Error opening new searcher. exceeded limit of maxWarmingSearchers=2, try again later.
com.liferay.portal.kernel.search.SearchException: Error from server at http://localhost:8983/solr/liferay: Error opening new searcher. exceeded limit of maxWarmingSearchers=2, try again later.
at com.liferay.portal.search.solr.internal.SolrIndexWriter.commit(SolrIndexWriter.java:81)
at sun.reflect.GeneratedMethodAccessor345.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:86)
at com.liferay.portal.kernel.messaging.proxy.ProxyMessageListener.receive(ProxyMessageListener.java:54)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
at java.lang.Thread.run(Thread.java:745)


Why is this error being logged? Is this because of any mis-configuration of Solr in control panel?

But I would like to make one thing clear that Solr admin is successfully running my queries and giving results as expected.
Then what does this error mean?


Thanks and regards,
Gaurav
thumbnail
Ilenia Zedda, modificado 7 Anos atrás.

RE: Liferay DXP and Solr

New Member Postagens: 16 Data de Entrada: 28/05/15 Postagens Recentes
Hi Gaurav,
I've configured my local solr server to have in file '/solr-5.5.2/server/solr/liferay/conf/solrconfig.xml'
the value
<maxWarmingSearchers>10</maxWarmingSearchers>

Cheers,
Ilenia
thumbnail
Gaurav Jain, modificado 7 Anos atrás.

RE: Liferay DXP and Solr

Junior Member Postagens: 85 Data de Entrada: 12/07/16 Postagens Recentes
Thanks Ilenia,

It was really helpful. After modifying value of <maxWarmingSearchers>10</maxWarmingSearchers> property, my issue was resolved.

Regards,
Gaurav