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

Reply via email to