Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 84 results.
of 5
Florencia Gadea
Solr and Liferay 6.1 Integration problem
May 16, 2012 5:28 AM
Answer

Florencia Gadea

Rank: Regular Member

Posts: 146

Join Date: March 27, 2012

Recent Posts

Hi Everyone,

I'm trying to make Solr work with Liferay 6.1, in Ubuntu. As there is no solr-web plugin for Liferay 6.1, I decided to download the solr-web sources from the svn server and compile it myself. I created the war and installed it. Everything went ok. I also go to http://localhost:8080/solr/admin/ and Solr is up and running. But when I go to Control Panel -> Server -> server administration -> Reindex all search indexes and click on Execute, it indexes with Lucene, not Solr (from what I see in the log). Besides, I'm not sure how to check if it is using Solr or not.

What do I have to do now to make Solr work?

TIA,

Florencia.
Bart Simpson
RE: Solr and Liferay 6.1 Integration problem
May 16, 2012 5:48 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 524

Join Date: August 29, 2011

Recent Posts

Do you see some kind of error in liferay console that it's not able to connect to Solr?
Florencia Gadea
RE: Solr and Liferay 6.1 Integration problem
May 16, 2012 6:17 AM
Answer

Florencia Gadea

Rank: Regular Member

Posts: 146

Join Date: March 27, 2012

Recent Posts

Hi Paul,

No, I don't see any errors in the console. It loads a lot of Solr's stuff.

This is what I see when I run execute:

 1
 213:13:05,255 INFO  [LuceneIndexer:74] Reindexing Lucene started
 313:13:05,365 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.assetpublisher.util.AssetIndexer started
 413:13:05,367 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.assetpublisher.util.AssetIndexer completed in 0 seconds
 513:13:05,370 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.usersadmin.util.OrganizationIndexer started
 613:13:05,754 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.usersadmin.util.OrganizationIndexer completed in 0 seconds
 713:13:05,758 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.usersadmin.util.UserIndexer started
 813:13:08,124 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.usersadmin.util.UserIndexer completed in 2 seconds
 913:13:08,125 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.journal.util.JournalIndexer started
1013:13:08,504 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.journal.util.JournalIndexer completed in 0 seconds
1113:13:08,505 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.messageboards.util.MBIndexer started
1213:13:09,140 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.messageboards.util.MBIndexer completed in 0 seconds
1313:13:09,141 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.bookmarks.util.BookmarksIndexer started
1413:13:09,734 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.bookmarks.util.BookmarksIndexer completed in 0 seconds
1513:13:09,735 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.blogs.util.BlogsIndexer started
1613:13:09,819 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.blogs.util.BlogsIndexer completed in 0 seconds
1713:13:09,822 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.wiki.util.WikiIndexer started
1813:13:11,352 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.wiki.util.WikiIndexer completed in 1 seconds
1913:13:11,353 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.calendar.util.CalIndexer started
2013:13:11,370 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.calendar.util.CalIndexer completed in 0 seconds
2113:13:11,370 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.softwarecatalog.util.SCIndexer started
2213:13:11,389 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.softwarecatalog.util.SCIndexer completed in 0 seconds
2313:13:11,390 INFO  [LuceneIndexer:148] Reindexing with class com.liferay.portlet.documentlibrary.util.DLIndexer started
2413:13:11,691 INFO  [LuceneIndexer:154] Reindexing with class com.liferay.portlet.documentlibrary.util.DLIndexer completed in 0 seconds
2513:13:11,691 INFO  [LuceneIndexer:122] Reindexing Lucene completed in 6 seconds


Regards,

Flor.
Florencia Gadea
RE: Solr and Liferay 6.1 Integration problem
May 16, 2012 8:47 AM
Answer

Florencia Gadea

Rank: Regular Member

Posts: 146

Join Date: March 27, 2012

Recent Posts

Besides, if I query some keywords in the Solr admin I don't get any results. Even if I query a *, I get no results, so I assume Solr is not working.
Bart Simpson
RE: Solr and Liferay 6.1 Integration problem
May 17, 2012 12:17 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 524

Join Date: August 29, 2011

Recent Posts

I have done the integration with 6.0 and there it indicates error when it's wasn't able to connect to Sorl. I'll try integration with 6.1 and update my findings.
Amit Doshi
RE: Solr and Liferay 6.1 Integration problem
May 17, 2012 12:59 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Hi Florencia,

I think Still your Liferay is not integrated with Solr. So, it is still searching in the Lucene.

Can you please mention the steps how you had done configuration for solr with Liferay ?

Because I think you are missing some steps.

Thanks & Regards,
Amit Doshi
Namrata Hangal
RE: Solr and Liferay 6.1 Integration problem
May 17, 2012 3:23 AM
Answer

Namrata Hangal

Rank: Regular Member

Posts: 161

Join Date: July 26, 2010

Recent Posts

Amit is right here.

What you have done so far Florencia is install only Solr. Another .war plugin needs to be deployed onto Liferay_Home/deploy in order to integrate it. Even after the integration is done, you need to Execute Reindex from control panel/server administration.

I'm also trying the same. Let me know what steps you have followed...!

Regards,
Namrata
Florencia Gadea
RE: Solr and Liferay 6.1 Integration problem
May 18, 2012 7:30 AM
Answer

Florencia Gadea

Rank: Regular Member

Posts: 146

Join Date: March 27, 2012

Recent Posts

Hi Everyone,

Here are the steps I followed:

A) Installed the Solr example as an instance under Tomcat:

A.1) Downloaded the 1.4.1 sources of Solr and uncompressed the zip file under /opt/solr. Installed it following the steps from http://lucene.apache.org/solr/
A.2) Executed ant dist in the source directory (so the apache-solr-1.4.1.war was created).
A.3) Executed ant example in the source directory.
A.4) Copied the war file into /opt/solr/example.
A.5) Created the solr.xml file in $TOMCAT_DIR/conf/Catalina/localhost, with the following text:
1
2        <?xml version="1.0" encoding="utf-8"?>
3                <Context docBase="/opt/solr/example/apache-solr-1.4.1.war" debug="0" crossContext="true">
4                         <Environment name="solr/home" type="java.lang.String" value="/opt/solr/example/solr" override="true"/>
5                </Context>

A.6) At the end of $TOMCAT_DIR/bin/setenv.sh added the following line: JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/opt/solr/example/solr/data
A.7) Appended -Dsolr.solr.home=/opt/solr/example/solr to the $JAVA_OPTS variable in catalina.sh.
A.8) I checked that the proper schema.xml file is under /opt/solr/example/solr/conf.
A.9) If I go to localhost:8080/solr/admin I see solr up and running.

B ) Installed the sorl-web plugin in my liferay instance:

B.1) Checked out liferay and solr-web from the svn repositories.
B.2) In solr-spring.xml I let the localhost:8080 address, because that is where it is running.
B.2) Compiled liferay, solr-web and created the solr-web-6.1.0.1.war file.
B.3) Started up tomcat.
B.4) In my liferay instance, I installed the solr-web-6.1.0.1.war file from the Plugin Installer. catalina.out did not show any errors, apparently the installation was ok.
B.5) I executed Control Panel -> Server -> server administration -> Reindex all search indexes.

Solr is still not integrated with Liferay. What am I missing?

Regards,

Florencia.
Florencia Gadea
RE: Solr and Liferay 6.1 Integration problem
May 18, 2012 9:06 AM
Answer

Florencia Gadea

Rank: Regular Member

Posts: 146

Join Date: March 27, 2012

Recent Posts

By the way, when I deploy the solr-web plugin, this is what catalina.out shows:

 116:03:45,797 INFO  [AutoDeployDir:167] Processing solr-web-6.1.0.1.war
 216:03:45,837 INFO  [WebAutoDeployListener:43] Copying web plugin for /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/deploy/solr-web-6.1.0.1.war
 3  Expanding: /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/deploy/solr-web-6.1.0.1.war into /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/temp/20120518160345839
 4  Copying 1 file to /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/temp/20120518160345839/WEB-INF
 5  Copying 1 file to /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/temp/20120518160345839/WEB-INF/classes
 6  Copying 1 file to /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/temp/20120518160345839/WEB-INF/classes
 7  Copying 1 file to /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/temp/20120518160345839/META-INF
 8  Copying 58 files to /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/solr-web
 9  Copying 1 file to /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/solr-web
10  Deleting directory /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/temp/20120518160345839
1116:03:46,331 INFO  [WebAutoDeployListener:49] Web plugin for /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/deploy/solr-web-6.1.0.1.war copied successfully. Deployment will start in a few seconds.
12May 18, 2012 4:03:51 PM org.apache.catalina.startup.HostConfig deployDirectory
13INFO: Deploying web application directory /opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/solr-web
1416:03:51,992 INFO  [PluginPackageUtil:1099] Reading plugin package for solr-web
15Loading file:/opt/liferay/innovation/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/temp/1-solr-web/WEB-INF/classes/portlet.properties


So I assume that the plugin was properly installed.

Regards,

Flor.
Amit Doshi
RE: Solr and Liferay 6.1 Integration problem
May 18, 2012 12:54 PM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Hi Florencia,

Please check below blog that was written by me.

http://liferaytrends.blogspot.in/2012/05/integrating-solr-with-liferay-6.html

The Blog was written Considering the Solr with Liferay 6.0.10 but I don't think there will be any changes if you use Liferay 6.1 the integration Steps will remain the same.

Hope it helps.

Thanks & Regards,
Amit Doshi
Namrata Hangal
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 3:05 AM
Answer

Namrata Hangal

Rank: Regular Member

Posts: 161

Join Date: July 26, 2010

Recent Posts

Hi Amit,

Could you please provide an excerpt from your article? Blogs are not accessible from within some secure LAN networks.
Appreciate your help

Regards
Amit Doshi
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 3:21 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Hi Namrata,

I just copy pasted from my blog, sorry for bad formatting.

Building Solr & Installing Solr instance on tomcat.




1. Download Solr-1.3.0 release from Solr.
2. Unzip .tar on some location. For eg. /opt/solr/
3. Make /opt/solr/example/solr as a $SOLR_HOME.
4. Copy apache-solr-1.3.0.war file from /opt/solr/dist and paste it into /opt/solr/example/solr.
5. Open up the /opt/solr/example/solr/conf/solrconfig.xml
Replace
<dataDir>${solr.data.dir: ./solr/data}</dataDir>
by following
<dataDir>${solr.data.dir:/opt/solr/example/solr/data}</dataDir>


Note: The dataDir can also be temporarily overridden with the JAVA_OPTS environment variable prior to starting Tomcat
export JAVA_OPTS="$JAVA_OPTS -Dsolr.data.dir=/opt/solr/example/solr/data"

6. It is recommended to run the Solr instance on separate tomcat instance other than liferay tomcat.
7. So for separate tomcat for solr, consider it here. $SOLR_TOMCAT
8. Into $SOLR_TOMCAT/conf/Catalina/localhost , create one solr.xml file and copy following content into the file and save it.

<context crosscontext="true" debug="0" docbase="/opt/solr/example/solr/apache-solr-1.3.0.war">

<environment name="solr/home" override="true" type="java.lang.String" value="/opt/solr/example/solr">

</environment>
</context>


9. Now start tomcat and check that it is running without any error or not.

Integrating Solr plugin with Liferay



1. Download Solr plugin which is compatible with the Liferay version.
2. Drop the plugin into $LIFERAY_HOME/deploy directory.
3. Start liferay tomcat server. After started liferay tomcat, just stop both the tomcat servers (SOLR_TOMCAT and LIFERAY_TOMCAT).
4. Openup the $LIFERAY_HOME/tomcat-6.0.18/webapps/solr-web/WEB-INF/classes/META-INF/solr-spring.xml

for bean id=”solrServer” give the solar tomcat settings and save it.
for eg. http://localhost:8181/solr

5. Copy the $LIFERAY_HOME/tomcat-6.0.18/webapps/solr-web/WEB-INF/conf/schema.xml file and paste it into /opt/solr/example/solr/conf/ directory.
And it is done now.

Thanks & Regards,
Amit Doshi
Namrata Hangal
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 3:26 AM
Answer

Namrata Hangal

Rank: Regular Member

Posts: 161

Join Date: July 26, 2010

Recent Posts

Thanks Amit! emoticon

Just curious to know which plugin you downloaded
Download Solr plugin which is compatible with the Liferay version.
Namrata Hangal
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 3:27 AM
Answer

Namrata Hangal

Rank: Regular Member

Posts: 161

Join Date: July 26, 2010

Recent Posts

I tried integrating solr 1.4.1 with liferay 6.1 but facing a lot of issues.
Here's a link to the discussion thread -
http://www.liferay.com/community/forums/-/message_boards/message/12593031

Any suggestions/inputs?
Thanks
Amit Doshi
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 4:33 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Hi Namrata,

The above configuration I done is with Liferay 6.0.10 with apache-solr-1.3.0

Thanks & Regards,
Amit Doshi
Namrata Hangal
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 4:40 AM
Answer

Namrata Hangal

Rank: Regular Member

Posts: 161

Join Date: July 26, 2010

Recent Posts

Yes Amit, I understood which versions of solr and liferay you are using.
What I wanted to know is where did you download the solr-web plugin for liferay from?
Amit Doshi
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 4:52 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

For Liferay 6.0.10, we are getting solr-web plugin from Plugin Installation--> Web Plugins.

There is a problem with 6.1. We are not getting solr-web from Plugins installion. As we are using EE for 6.1 so with the help Liferay Credentials of EE, we are directly downloading from Liferay Website.
Vitor Silva
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 5:03 AM
Answer

Vitor Silva

Rank: Junior Member

Posts: 36

Join Date: May 3, 2012

Recent Posts

Actually I managed to integrate SOLR 3.6 with Liferay Portal 6.1. I am doing tests as we speak.
The solr-web needed to change the dependency classpath to the jars inside the distribution folder of solr 3.6.
Even so, the official integration with 1.4.1 of SOLR must work.
To better understand the behaviour of Liferay + SOLR, what Liferay does is delegate the indexing mechanism on solr-web that operates against solr through http. The result queries made by solr-web are then translated to Liferay again. The communication between Liferay and Solr-web is done via the Liferay Message Bus.
Some common issues may occur:
- Users are not displayed (this means an error occurred while doing the HTTP SOLR querie against SOLR). Probably the solr endpoint is not properly configured in the solr-spring.xml inside solr-web or it is a solr-web classpath problem. Refresh the Users and Organizations page and check the log file.
- Lucene is being used instead of SOLR. Of you see the LuceneIndexer executing this means the SOLR-Web probably failed to start. Upon installation ( put it inside the deploy folder of course) SOLR-Web will register SOLR as the indexing engine. If SOLR-Web fails to start then the default Lucene indexer will execute.

To help the first thing that should be done is check the SOLR endpoint to see if it is running. Then solr can be configured for debug level to see the queries being made, for example refreshing the Users and Organizations page will result on a specific querie. Check for errors. If the request didn't reach the SOLR Server, go to Liferay control panel and activate "com.liferay.portal.kernel.search" package to debug level . This will show you the query that was issued for execution against solr.

Keep in mind that the most common is something solr-web related or your solr server instance is not running on localhost:8080, and the spring bean is not properly configured.
Namrata Hangal
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 5:17 AM
Answer

Namrata Hangal

Rank: Regular Member

Posts: 161

Join Date: July 26, 2010

Recent Posts

Hi Vitor,

Thanks for the inputs.

Would really appreciate if you could tell, for the benefit of all those struggling with this task, the steps you have followed.

I have followed all steps, to the point, but haven't been able to integrate solr 1.4.1 with liferay 6.1.
I'm also curious to know why there isn't any official web plugin for 6.1? I downloaded the one at sourceforge!

Thanks & Regards
Vitor Silva
RE: Solr and Liferay 6.1 Integration problem
May 21, 2012 6:23 AM
Answer

Vitor Silva

Rank: Junior Member

Posts: 36

Join Date: May 3, 2012

Recent Posts

Namrata Hangal:
Hi Vitor,

Thanks for the inputs.

Would really appreciate if you could tell, for the benefit of all those struggling with this task, the steps you have followed.

I have followed all steps, to the point, but haven't been able to integrate solr 1.4.1 with liferay 6.1.
I'm also curious to know why there isn't any official web plugin for 6.1? I downloaded the one at sourceforge!

Thanks & Regards


Hi Namrata,
It is the official Community plugin, it is available for download at sourceforge.
The official Enterprise plugin is allocated on Liferay Servers of course.
Which steps have you followed?
I will re-install everything in a clean Liferay 6.1 and create a step by step report here.
Showing 1 - 20 of 84 results.
of 5