I have a SolrJ application that reads from a Redis queue and updates
different collections based on the message content. New collections are
added without my knowledge, so I am creating SolrServer objects on the fly
as follows:
def solrHost = "http://myhost/solr/" (defined at startup)
def solrTarget = solrHost + collectionName
SolrServer solrServer = new CommonsHttpSolrServer(solrTarget)
updateResponse = solrServer.add(solrdoc)
This does work but obviously creates a new CommonsHttpSolrServer instance
for each message. I assume GC will eliminate these but is there a way to do
this with a single SolrServer object?
The SOLR host is version 3.5 and I am using the 3.5 jars for my application
(not sure if that is necessary).
--
View this message in context:
http://lucene.472066.n3.nabble.com/Can-a-single-SolrServer-instance-update-multiple-collections-tp4192480.html
Sent from the Solr - User mailing list archive at Nabble.com.