3
votes

Does anyone know if Azure Search handles optimistic concurrency, if indeed it does?

I know merge is used to update the index, but the merge overwrites the existing values (e.g. collection has "A, B, C" and you merge "D" the result is "D" not "A, B, C, D"). Therefore you need to read the index to get the value, merge in code and then write it back. Of course, the write back could be with stale data.

You can't seem to add multiple "select" statements (Merge is by Id only) so you can't implement your own "version" handling.

Is there a way to do this (or does anybody have any workarounds?)

Thanks

1

1 Answers

2
votes

We don't currently offer a way to do this, you'll need to serialize potentially-overlapping writes. We would like to introduce etags support at some point to handle the scenario you're describing.