Solr executes the deletes and adds in the order they are received.
Commitwithin isn't relevant to the execution order.

commitWithin just controls when the accumulated changes are flushed to
a new index segment and is global,
not per request.

Let's say Solr gets a request with commitWithin. It starts a timer for
that core. When that timer expires, all
accumulated updates (adds, deletes, whatever) are written out. For example

T+0 add received with commitWithin set to 5 seconds, add for doc1
T+1 delete for doc1 with commitWithin set for 5 seconds
T+5 both the add and delete are written

Best,
Erick

On Mon, Oct 30, 2017 at 4:35 AM, David Svånå <david.sv...@gmail.com> wrote:
> Hi,
>
> If I send multiple instructions /update with a bunch of deletes and adds,
> all having commitWithin specified, how can I make sure that the
> instructions are executed in the same order as I send them in?
>
> For example, if both a delete and an add is sent for the same ID, I want to
> be able to control whether the delete happens before or after the add. If
> the 'add' is more recent then I want to run the delete first (or only add),
> or if the add is older, then I should run the delete.

Reply via email to