5 sites on the same machine using one java machine?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
picxelplay's picture

I have 5 independent sites on one machine. I also have another machine running just Java. How can I get all 5 sites to use the same 1 java machine for Solr? Would I install Solr 5 times for each of the sites? Would each Solr instance be installed in each of the sites /home directory; instead of say /usr/local/share. When the apachesolr.modules are installed on each site, how would I have it recognize just it's own instance and not the other 4? Or is there a better way to do this?

Comments

You would use the multi-core

pwolanin's picture

You would use the multi-core feature of Solr. It can handle a large number of independent search indexes (cores) at the same time (10's to 100's depending on index size). E.g. drupal.org uses this to have indexes for each site on the same server.

Each on has a different path, e.g. localhost:8080/solr/core0/select vs. localhost:8080/solr/core1/select

see: http://wiki.apache.org/solr/CoreAdmin

Note that the Drupal apachesolr module Solr configuration that's provided requires that every core have a full set of configuration file (even though some may be empty).

If you look in the Solr download in the example directory you will see a multicore directory set up to use 2 cores.

Replace the conf in each with a full set of conf as specified in the Drupal module and then run:

java -Dsolr.solr.home=multicore -jar start.jar

-

picxelplay's picture

 

 

 

I copied:

apachesolr/schema.xml  (drup module)
apachesolr/solrconfig.xml (drup module)

to

apache-solr/example/multicore/core0/conf

I copied:

apache-solr/example/solr/conf/elevate.xml
apache-solr/example/solr/conf/mapping-ISOLatin1Accent.txt
apache-solr/example/solr/conf/protwords.txt
apache-solr/example/solr/conf/stopwords.txt
apache-solr/example/solr/conf/synonyms.txt

to

apache-solr/example/multicore/core0/conf

ran:

java -Dsolr.solr.home=multicore -jar start.jar

Changed Solr path: in the module from /solr to /multicore/core0, but it didn't connect. What am I missing?

http://picxelplay.com

write>read>preview>edit>read>post

The webapp path doesn't

pwolanin's picture

The webapp path doesn't change regardless of where the solr home due is located.

Use /solr per my example urls at the top.

Also, start using your browser for basic testing. Just visit that URL rather than starting with the module settings.

-

picxelplay's picture

Your instructions were just fine actually. I forgot to update my autostart script with the new option. Thanks a bunch for your help.

http://picxelplay.com

write>read>preview>edit>read>post

Lucene, Nutch and Solr

Group organizers

Group categories

Projects

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: