On 10/24/2015 5:21 AM, Jamie Johnson wrote:
> Looking at the code and jira I see that ordering actions in solrj update
> request is currently not supported but I'd like to know if there is any
> other way to get this capability.  I took a quick look at the XML loader
> and it appears to process actions as it sees them so if the order was
> changed to order the actions as
> 
> Add
> Delete
> Add
> 
> Vs
> Add
> Add
> Delete
> 
> Would this cause any issues with the update?  Would it achieve the desired
> result?  Are there any other options for ordering actions as they were
> provided to the update request?

If those three actions are in separate update requests using
HttpSolrClient or CloudSolrClient in a single thread, I would expect
them to be executed in the order you make the requests.  If you're using
multiple threads, then you probably cannot guarantee the order of the
requests.

Are you using one of those clients in a single thread and seeing
something other than what I have described?  If so, I think that might
be a bug.

If you're using ConcurrentUpdateSolrClient, I don't think you can
guarantee order.  That client has multiple threads pulling the requests
out of an internal queue.  If some requests complete substantially
faster than others, they could happen out of order.  The concurrent
client is a poor choice for anything but bulk inserts, and because of
the fact that it ignores almost every error that happens while it runs,
it often is not a good choice for that either.

Thanks,
Shawn

Reply via email to