lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Martin <jmar...@path-works.com>
Subject SolrCore as Singleton?
Date Thu, 07 Sep 2006 13:32:14 GMT
Is there a good reason for implementing SolrCore as a Singleton?

We are experimenting with running Solr as a Spring service embedded in 
our app.  Since it is a Singleton
we cannot have more than one index (not currently  a problem, but could be).

I note the comment:

  // Singleton for now...

If there is no specific reason for making it a Singleton, I'd vote for 
removing this so that the
SolrCore(dataDir, schema) constructor could be used to instantiate 
multiple cores.

Seems to me that since the primary usage scenario of solr is access via 
REST (i.e. no Solr jar/API),
the Singleton pattern is not necessary here.

--Joachim

Mime
View raw message