On 5/15/2018 12:12 AM, Bernd Fehling wrote:
OK, I have the CloudSolrClient with SolrJ now running but it seams
a bit slower compared to ConcurrentUpdateSolrClient.
This was not expected.
The logs show that CloudSolrClient send the docs only to the leaders.

So the only advantage of CloudSolrClient is that it is "Cloud aware"?

With ConcurrentUpdateSolrClient I get about 1600 docs/sec for loading.
With CloudSolrClient I get only about 1200 docs/sec.

ConcurrentUpdateSolrClient internally puts all indexing requests on a queue and then can use multiple threads to do parallel indexing in the backround.  The design of the client has one big disadvantage -- it returns control to your program immediately (before indexing actually begins) and always indicates success.  All indexing errors are swallowed.  They are logged, but the calling program is never informed that any errors have occurred.

Like all other SolrClient implementations, CloudSolrClient is thread-safe, but it is not multi-threaded unless YOU create multiple threads that all use the same client object.  Full error handling is possible with this client.  It is also fully cloud aware, adding and removing Solr servers as the SolrCloud changes, without needing to be reconfigured or recreated.

Thanks,
Shawn

Reply via email to