Under the hood it can for now do the projection query, followed by a purge by id.
That wouldn't be atomic, so besides being inefficient it would also require the lock the index writer in exclusive mode (blocking any write) between the projection execution and the purge by id. Locking the index isn't trivial either, as you'd need to send a "lock command" to the master node over say JMS and then
-
you don't have a callback which tells you when the lock was granted
-
you'd need to make sure the index is eventually unlocked even if the requesting node is crashed
Not so simple
|