Saturday, 26 January 2013

1) Download the Apache Solr 3.6.1 and build the example.

2) Make a copy
cd solr
cp -r example example7574

3) Change the port number

perl -pi -e s/8983/7574/g example7574/etc/jetty.xml example7574/exampledocs/post.sh
4) In window 1, start up the server on port 8983

         cd example
         java -server -jar start.jar


5) In window 2, start up the server on port 7574

         cd example7574
         java -server -jar start.jar


6) In window 3, index some example documents to each server


         cd example/exampledocs
         ./post.sh [a-m]*.xml


         cd ../../example7574/exampledocs
         ./post.sh [n-z]*.xml


7) Now do a distributed search across both servers with your browser or curl

Open Browser:
http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solr&indent=true&q=ipod+solr

OR
Open Terminal:
curl 'http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solr&indent=true&q=ipod+solr'

0 comments:

Post a Comment

Find me on Facebook! Follow me on Twitter!