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 Grant Ingersoll <gr...@yahoo.com> on 2006/03/21 22:13:46 UTC

Multiple indices

I was wondering if it is possible to have one SOLR instance host multiple indices?  Otherwise, I would need to deploy a separate WAR for every SOLR instance I want, correct?

Not sure if this related to the discussion of location of configuration files that occurred on the dev list...  But, if it could host multiple indices, we might want to put the schema in the same directory as the index, and then have the config point to the different indices.

-Grant



----------------------------------------------
Grant Ingersoll
http://www.grantingersoll.com
		
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 

Re: Multiple indices

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Just a quick comment.... not sure how things are really set up for Solr, but one could use the /solr/index/XXX URL "scheme" to determine which index the request is for.  Configs for different indices could be named after that "index" part in the URL, and that "index" part could be used as the key in various data structures that store index-specific information.

Otis

----- Original Message ----
From: Chris Hostetter <ho...@fucit.org>
To: solr-user@lucene.apache.org
Sent: Wednesday, March 22, 2006 3:10:36 PM
Subject: Re: Multiple indices


: norms, term vectors, field caches, etc.  It almost sounds like one
: would want multiple instances of Solr in the same app container.  But
: if that's the case, you aren't saving much over just having multiple
: app servers.

I didn't say anything yesterday because i pretty much agreed with yonik
... but it occured to me this morning that if you have a finite amout of
ram on a box (which we all do) 'R' gigs, and you want to run a variable
number of solr indexs 'N", the only way to do this currently is to run
N appserver instances and explicitly configure the JVM for each to use at
most R/N Gigs max heap ... which would bnot only make addign a new index a
pain (you have to reconfigure every appserver instance) but it also means
that you are managine your memory instead of letting java do it.

if it was possible to run several indexes in one appserver, then you
wouldn't have to wworry about this (but if you wnated to worry about it,
you could run some or all of your indexes in their own appserver
instances)

perhaps one way to go would be if solr paid attention to what webapp name
it was being run in, and used that to determine the directory it looked in
for it's configs/index? ... so most people would just intall "solr.war"
and it would look for everything in ./solr/  -- but if i want multiple
idexes i copy solr.war was solr-people.war, solr-places.war, and
solr-things.war, and now i've got 3 webapps running solr, and 3 seperate
directories containing 3 seperate indexes and configs... ./solr-people/,
./solr-places/, ./solar-things, etc...




-Hoss





Re: Multiple indices

Posted by Chris Hostetter <ho...@fucit.org>.
: norms, term vectors, field caches, etc.  It almost sounds like one
: would want multiple instances of Solr in the same app container.  But
: if that's the case, you aren't saving much over just having multiple
: app servers.

I didn't say anything yesterday because i pretty much agreed with yonik
... but it occured to me this morning that if you have a finite amout of
ram on a box (which we all do) 'R' gigs, and you want to run a variable
number of solr indexs 'N", the only way to do this currently is to run
N appserver instances and explicitly configure the JVM for each to use at
most R/N Gigs max heap ... which would bnot only make addign a new index a
pain (you have to reconfigure every appserver instance) but it also means
that you are managine your memory instead of letting java do it.

if it was possible to run several indexes in one appserver, then you
wouldn't have to wworry about this (but if you wnated to worry about it,
you could run some or all of your indexes in their own appserver
instances)

perhaps one way to go would be if solr paid attention to what webapp name
it was being run in, and used that to determine the directory it looked in
for it's configs/index? ... so most people would just intall "solr.war"
and it would look for everything in ./solr/  -- but if i want multiple
idexes i copy solr.war was solr-people.war, solr-places.war, and
solr-things.war, and now i've got 3 webapps running solr, and 3 seperate
directories containing 3 seperate indexes and configs... ./solr-people/,
./solr-places/, ./solar-things, etc...




-Hoss


Re: Multiple indices

Posted by Yonik Seeley <ys...@gmail.com>.
On 3/21/06, Grant Ingersoll <gr...@yahoo.com> wrote:
> I was wondering if it is possible to have one SOLR instance host multiple indices?  Otherwise, I would need to deploy a separate WAR for every SOLR instance I want, correct?

It's not currently possible.  A fair amount would have to change to
support that I think...
- index id in all update commands (or a change in the URL path)
- index id in all query commands (or a change in the URL path)

Would a single index searcher go over multiple unrelated indicies?  I
think not, since that would tend to cause problems for thinks like
norms, term vectors, field caches, etc.  It almost sounds like one
would want multiple instances of Solr in the same app container.  But
if that's the case, you aren't saving much over just having multiple
app servers.

-Yonik