lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: CloudSolrClient - setDefaultCollection
Date Thu, 21 Jun 2018 15:07:27 GMT
On 6/21/2018 5:04 AM, Greenhorn Techie wrote:
> While indexing, is there going to be any performance benefit to set the
> collection name first using setDefaultCollection
> <>
> (String
> <>
> collection)
> method and then index the document
> using cloudClient.add(solrInputDoc), instead of suing the method
> cloudClient.add(collectionName, solrInputDoc)?
> Is this performance benefit to consider or is this mere of a convenience /
> better looking code?

There should be no detectable performance difference between the two 
unless you've got an accurate way to measure microseconds or 
nanoseconds.  Even then, the difference should be extremely small.

If the code was written smartly, and usually Solr code is written very 
well, both will end up being executed by the same final code, it will 
just be the source of the collection string that will be different.


View raw message