Search and Intelligence — 2

Vivek
Vivek
Jun 12, 2018 · 4 min read
$ # get solr from "http://lucene.apache.org/solr/mirrors-solr-latest-redir.html"
$ # unzip the compressed file
$ # simply run bin/solr start
$ bin/solr start*** [WARN] *** Your open file limit is currently 4864.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] *** Your Max Processes Limit is currently 709.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
Waiting up to 180 seconds to see Solr running on port 8983 [-]
Started Solr server on port 8983 (pid=13231). Happy searching!
Production setup of Solr
$ #let's say you have a disk mounted as "/mnt" and you downloaded and installed Solr in this disk
$ cd /mnt
$ # you might have a parent folder here, let's say "solr6"
$ cd solr6
$ pwd
/mnt/solr6
$ # you will have a folder here called "data" that has your cores
$ cd data
$ pwd
/mnt/solr6/data
$ # all your cores will be listed here (let's say songs and artists)
$ ls
songs artists
$ cd songs
$ pwd
/mnt/solr6/data/songs
$ # in this core you will have these 2 folders primarily:
$ # conf/ data/
$ # conf/ has all your configurations
$ # such as "solrconfig.xml" and "schema.xml"
$ # data/ has your actual indexes
$ # we will be concerned with conf/ folder only, usually.
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<!--
For enabling Master just do the following. This specifies the replication to slaves. The files in "conf/" folder that will be replicated are mentioned in confFiles. This is important. Let's say we change our schema on master, we do not want to change schema on each of the slaves. New schema can be simply replicated.
-->
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="replicateAfter">startup</str>
<str name="confFiles">schema.xml</str>
</lst>
<!--
For enabling Slave just uncomment the following and comment out the master block above. This slave syncs data from master every 1 hour.
-->
<!--
<lst name="slave">
<str name="masterUrl">http://solr_master:8080/solr/songs</str>
<str name="pollInterval">01:00:00</str>
</lst>
-->
</requestHandler>
Vivek

Written by

Vivek

An enthusiastic software engineer powered with machine learning skills.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade