On 6/26/2015 2:27 PM, Jorge Luis Betancourt González wrote:
> I'm trying to use the ConcurrentUpdateSolrClient class, that has some methods 
> that accept and aditional parameter to indicate the collection, some of this 
> methods are add(String collection, SolrInputDocument doc), 
> request(SolrRequest, String collection). With HttpSolrClient this works 
> flawlessly, but with ConcurrentUpdateSolrClient the request gets made against 
> the URL specified in the constructor. 
>
> In the case of the  commit(String collection) method, works without any 
> trouble and the commit gets fired against the desired collection. 

This is definitely a bug.  Can you open an issue in Jira?

Looking into how an update request actually gets added to the background
queue in ConcurrentUpdateSolrClient, it appears that the "collection"
information is ignored before the request is added to the queue.

As a workaround until the bug can be fixed, instead of this:

  client.add("status", doc);

Use this (assuming that your update handler is indeed /update, which it
normally will be):

  UpdateRequest req = new UpdateRequest("/status/update");
  req.add(doc);
  req.process(_client);

Thanks,
Shawn

Reply via email to