You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by 小池智浩 <tk...@genes.nig.ac.jp> on 2011/11/10 10:17:50 UTC

Multiple solr webapps

Hello,

I'm designing a solr web system and our system will have multiple
solr instances on a Tomcat.

According to solr wiki, an instruction to use single war file and
multiple context files (solr[1-2].xml).

http://wiki.apache.org/solr/SolrTomcat#Multiple_Solr_Webapps

I wonder why following structure is not enough.  I think this is
the simplest way (disk space is a bit more necessary, of course):

tomcat/
  conf/
    Catalina/
      localhost/
        solr1.xml (docBase should be "webapps/solr1")
        solr2.xml (docBase should be "webapps/solr2")
  webapps/
    solr1/
      WEB-INF/
        ....
    solr2/
      WEB-INF/
        ....

I noticed this caution on the wiki page:

> Don't put anything related to Solr under the webapps directory.

Can someone tell me why "don't put anything related to solr under
the webapps"?  Is this the reason why single war file configuration
is recommended ?

Many thanks,
Tomohiro Koike

-- 
/* End of Message by Koike,T. */

Re: Multiple solr webapps

Posted by Chris Hostetter <ho...@fucit.org>.
: According to solr wiki, an instruction to use single war file and
: multiple context files (solr[1-2].xml).
	...
: I wonder why following structure is not enough.  I think this is
: the simplest way (disk space is a bit more necessary, of course):

...there's nothing stoping you from actually cloning the entire webapp, 
but there is also no good reason for it.  you still have to to use 
something like JNDI to configure the individual webapp instances to know 
what solr home dir to use.

: I noticed this caution on the wiki page:
: 
: > Don't put anything related to Solr under the webapps directory.
: 
: Can someone tell me why "don't put anything related to solr under
: the webapps"?  Is this the reason why single war file configuration
: is recommended ?

Because tomcat does bad things if you have both a webapps/foo/ (or a 
webapps/foo.ar) and a context file named "foo.xml".  i don't remember 
what exactly the problem is, but they are intended to be mutually 
exclusive -- ie: either you use the context file and point to the war 
outside of the webapps dir, or you use the webapps dir -- not both.


-Hoss

Re: Multiple solr webapps

Posted by Erick Erickson <er...@gmail.com>.
I'd ask a slightly different question, "Why don't
you simply use multiple cores?". Using multiple
web apps uses up more resources than using
multiple cores. Is there a reason that wouldn't
work?

Best
Erick

2011/11/10 小池智浩 <tk...@genes.nig.ac.jp>:
> Hello,
>
> I'm designing a solr web system and our system will have multiple
> solr instances on a Tomcat.
>
> According to solr wiki, an instruction to use single war file and
> multiple context files (solr[1-2].xml).
>
> http://wiki.apache.org/solr/SolrTomcat#Multiple_Solr_Webapps
>
> I wonder why following structure is not enough.  I think this is
> the simplest way (disk space is a bit more necessary, of course):
>
> tomcat/
>  conf/
>    Catalina/
>      localhost/
>        solr1.xml (docBase should be "webapps/solr1")
>        solr2.xml (docBase should be "webapps/solr2")
>  webapps/
>    solr1/
>      WEB-INF/
>        ....
>    solr2/
>      WEB-INF/
>        ....
>
> I noticed this caution on the wiki page:
>
>> Don't put anything related to Solr under the webapps directory.
>
> Can someone tell me why "don't put anything related to solr under
> the webapps"?  Is this the reason why single war file configuration
> is recommended ?
>
> Many thanks,
> Tomohiro Koike
>
> --
> /* End of Message by Koike,T. */
>