Databases Reference
In-Depth Information
Lucene index replication using Cluster Link
We talked about the Cluster Link feature for Ehcache replication. Cluster Link is a
very powerful feature and it can be used for Lucene index replication as well. Using
Cluster Link, Liferay Portal sends index changes to all the other Liferay Portal nodes
in the group. Internally, Cluster Links uses JGroups to send the index data across to
other nodes. Let's learn how to configure Cluster Link to replicate search indexes.
1.
Stop both the Liferay Portal nodes if they are already running.
2.
Add the following properties to the portal-ext.properties file of both
the nodes:
cluster.link.enabled=true
lucene.replicate.write=true
3.
Now restart both the nodes one by one.
We simply enabled Cluster Link through portal-ext.properties . We enable one
of the Lucene properties which generates replication events through Cluster Link for
every search index change. Cluster Link then distributes the event to all the nodes in
the cluster. With this option, each node will have their copy of search indexes.
Using the Apache Solr search engine
Apache Solr is one of the powerful open search engine projects. Liferay supports
Apache Solr integration. We can replace the default Lucene search engine with
Solr. Unlike Lucene, Solr runs as a separate application. In a clustered environment,
Liferay Portal nodes connect to centralize the Solr server to search and index the
data. Let's learn how to configure Liferay Portal with Solr.
1.
Connect to the server on which Solr has to be installed and create a root
named Solr .
2.
Download Apache Tomcat 7.0.34 server from the http://apache.
techartifact.com/mirror/tomcat/tomcat-7/v7.0.34/bin/apache-
tomcat-7.0.34.zip URL.
3.
Extract the apache-tomcat-7.0.34.zip file in the solr directory.
4.
Download Apache Solr 1.4.0 from the http://archive.apache.org/dist/
lucene/solr/1.4.0/apache-solr-1.4.0.zip URL.
5.
Extract the preceding apache-solr-1.4.0.zip file to a temporary directory.
From the extracted directory, copy the content of the apache-solr-1.4.0/
example/solr directory to the solr directory created in step 1.
 
Search WWH ::




Custom Search