ravendb/ravendb — pull request #557 by gareththackeray (2014-06-05 11:26:12+00:00)
Title: Scripted index multi update

At present if a Scripted Index Result leads to multiple updates to the same doc, only the last will happen. The reason for this is that the ScriptedJsonPatcher always heads to the database for a document. There is a test in this pull request that demonstrates the failure.

The fix is to store CreatedDocs as a dictionary rather than a list. Then when a doc is requested we first check in the dictionary and only go to the db if it has not already been created as part of the batch.

We need this functionality so if you could merge into 2.5 it would be very much appreciated. Thanks.