PojoIndexingQueueEventProcessingPlan should only deal with "previous" routes
As discussed here:
When the processing plan reindexes an entity, the “current route” passed as an argument to the add/addOrUpdate methods might not be up-to-date anymore, so we need to re-compute it from the entity.
Essentially, we don’t need to include a “current route” in indexing event; we only need to include all possible previous routes, to make sure that we will always delete previously indexed documents.
We should probably apply the following changes:
(maybe) change PojoIndexingQueueEventProcessingPlan / PojoIndexingQueueEventSendingPlan so that only a set of “previous routes” is passed to the methods. That set would include the current route, because by the time the event is processed, the “current” route can no longer be considered “current”.
change the implementation of PojoIndexingQueueEventProcessingPlan so that we don’t pass a “current route” to the underlying indexing plan. Instead, we ask the indexing plan to compute the current route, as well as the previous routes, and we additionally provide a list of “current of previous routes at the time of event creation” to be considered as previous routes (i.e. for additional deletes).