Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
tri trong
How to integration liferay-portal-tomcat-6.1.0-ce-ga1 with Solr ?
October 26, 2012 6:38 AM
Answer

tri trong

Rank: New Member

Posts: 9

Join Date: June 27, 2012

Recent Posts

Hi everyone.
I'm trying to make Solr work with Liferay 6.1, in Ubuntu. But error emoticon
I download apache-solr-3.6.1.zip, solr-web-6.1.0.1-ce-ga1-20120106155615760.war.
Here are the steps I followed:
1. Upzip apache-solr-3.6.1.zip to /opt/apache-solr-3.6.1 folder.
2. I copy apache-solr-3.6.1.war from /opt/apache-solr-3.6.1/dist to /opt/apache-solr-3.6.1/example
3. Create solr.xml in /opt/liferay/tomcat-7.0.23/conf/Catalina/localhost

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/opt/apache-solr-3.6.1/example/apache-solr-3.6.1.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/opt/apache-solr-3.6.1/example" override="true"/>
</Context>

4. Add following line at the end of /opt/liferay/tomcat-7.0.23/bin/setenv.sh

JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/opt/apache-solr-3.6.1/example/solr/data"

5. Copy "bin" and "conf" folder from /opt/apache-solr-3.6.1/example/solr to /opt/apache-solr-3.6.1/example/
6. Copy the solr-web-6.1.0.1-ce-ga1-20120106155615760.war to the folder $LIFERAY_HOME/deploy when the portal is running.
After deploying successfully, i shutdown server liferay.
7. I edit file solr-spring.xml /opt/liferay/tomcat-7.0.27/webapps/solr-web/WEB-INF/classes/META-INF


<?xml version="1.0"?>

<beans
default-destroy-method="destroy"
default-init-method="afterPropertiesSet"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
>
<bean class="com.liferay.portal.spring.context.PortletBeanFactoryPostProcessor" />

<!-- Solr search engine -->

<bean id="solrServer" class="com.liferay.portal.search.solr.server.BasicAuthSolrServer">
<constructor-arg type="java.lang.String" value="http://localhost:8080/solr" />
</bean>
<bean id="com.liferay.portal.search.solr.SolrIndexSearcherImpl" class="com.liferay.portal.search.solr.SolrIndexSearcherImpl">
<property name="solrServer" ref="com.liferay.portal.search.solr.server.BasicAuthSolrServer" />
<property name="swallowException" value="true" />
</bean>
<bean id="com.liferay.portal.search.solr.SolrIndexWriterImpl" class="com.liferay.portal.search.solr.SolrIndexWriterImpl">
<property name="commit" value="true" />
<property name="solrServer" ref="com.liferay.portal.search.solr.server.BasicAuthSolrServer" />
</bean>
<bean id="com.liferay.portal.search.solr.SolrSearchEngineImpl" class="com.liferay.portal.kernel.search.BaseSearchEngine">
<property name="clusteredWrite" value="false" />
<property name="indexSearcher" ref="com.liferay.portal.search.solr.SolrIndexSearcherImpl" />
<property name="indexWriter" ref="com.liferay.portal.search.solr.SolrIndexWriterImpl" />
<property name="luceneBased" value="true" />
<property name="name" value="SYSTEM_ENGINE" />
<property name="vendor" value="SOLR" />
</bean>

<!-- Configurator -->

<bean id="searchEngineConfigurator.solr" class="com.liferay.portal.kernel.search.PluginSearchEngineConfigurator">
<property name="searchEngines">
<list>
<ref bean="com.liferay.portal.search.solr.SolrSearchEngineImpl" />
</list>
</property>
</bean>
</beans>

8. I copy schema.xml from /opt/liferaySolr/tomcat-7.0.27/webapps/solr-web/WEB-INF/conf to /opt/apache-solr-3.6.1//example/solr/conf
9. I copy file apache-solr-solrj-3.6.1.jar from /opt/apache-solr-3.6.1/dist to /opt/liferaySolr/tomcat-7.0.27/webapps/solr-web/WEB-INF/lib
10. Start Liferay, i can go to http://localhost:8080/solr/admin/ and Solr is up and running. But log error

Oct 26, 2012 12:30:39 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/update params={waitSearcher=true&commit=true&waitFlush=true&wt=javabin&version=2} status=0 QTime=4
Oct 26, 2012 12:30:39 PM org.apache.solr.update.processor.LogUpdateProcessor finish
INFO: {add=[20_PORTLET_11686]} 0 1
Oct 26, 2012 12:30:39 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: ERROR: cannot set an index-time boost, norms are omitted for field scopeGroupId: 11467
at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:252)
at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60)
at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115)
at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:157)
at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:79)
at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

Oct 26, 2012 12:30:39 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/update params={wt=javabin&version=2} status=400 QTime=1
12:30:39,315 ERROR [SolrIndexWriterImpl:78] org.apache.solr.common.SolrException: Bad Request

Bad Request

request: http://localhost:8080/solr/update?wt=javabin&version=2
org.apache.solr.common.SolrException: Bad Request

Bad Request

request: http://localhost:8080/solr/update?wt=javabin&version=2
at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
at com.liferay.portal.search.solr.server.BasicAuthSolrServer.request(BasicAuthSolrServer.java:99)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:69)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:54)
at com.liferay.portal.search.solr.SolrIndexWriterImpl.addDocuments(SolrIndexWriterImpl.java:71)
at com.liferay.portal.search.solr.SolrIndexWriterImpl.updateDocuments(SolrIndexWriterImpl.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:83)
at com.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:57)
at com.liferay.portal.kernel.messaging.proxy.ProxyMessageListener.receive(ProxyMessageListener.java:50)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:106)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
at java.lang.Thread.run(Thread.java:679)
12:30:39,346 INFO [LuceneIndexer:154] Reindexing with class com.liferay.portlet.documentlibrary.util.DLIndexer completed in 5 seconds
12:30:39,347 INFO [LuceneIndexer:122] Reindexing Lucene completed in 8 seconds
12:30:39,463 ERROR [PortletRequestProcessor:377] Forward does not exist
Oct 26, 2012 1:01:30 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/admin/file/ params={file=schema.xml&contentType=text/xml;charset%3Dutf-8} status=0 QTime=1
Oct 26, 2012 1:04:36 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select/ params={indent=on&start=0&q=*:*&version=2.2&rows=10} hits=0 status=0 QTime=5

Please help me. Thank
Sorry for English not good.
Jignesh Thakkar
RE: How to integration liferay-portal-tomcat-6.1.0-ce-ga1 with Solr ?
September 13, 2013 2:45 AM
Answer

Jignesh Thakkar

Rank: New Member

Posts: 24

Join Date: May 9, 2010

Recent Posts

I am also facing the same problem. Can any one told me the solution for this?