lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Do all SolrCloud nodes communicate with the database when indexing a collection?
Date Fri, 19 Feb 2016 01:30:45 GMT
On 2/18/2016 3:08 PM, Colin Freas wrote:
> Thanks for the info, Anshum.
> Writing up a SolrJ program to do this is entirely within my wheelhouse.
> Read through some of the SolrJ docs and found some examples to start.
> A handful of questions if anyone has some pointers.
> 1. From a performance perspective, is it worth it to use
> ConcurrentUpdateSolrServer? Also, documentation says best for updates;
> does that include adding documents?

An add is one kind of update.

ConcurrentUpdateSolrClient (Server in 4.x and earlier) automates the
process of using multiple threads to send your update requests in
parallel, but it comes with a downside -- all exceptions that Solr or
SolrJ would normally throw due to problems with update requests will
*never* make it to your application.  The Solr server could be
completely down when you start your program, and every update request
you send will appear to succeed.

If you care about your program knowing when updates fail, use
HttpSolrClient or CloudSolrClient, and set up multiple threads that can
send updates to Solr with that object.  The client objects are fully
thread safe, so you can use the same object in multiple threads with no
problem.  You will need to know how to properly write a multi-threaded


View raw message