Sounds like you're searching and using the results to reindex the doc. Search
is not real time, but get is. So you could get the document after the search.
Also make sure your application isn't stepping on itself and is either in
serial or has some sort of lock idea.
--
You received this
Thanks for the reply. That seems like it could work. At least on the first
look.
But at second look:
How do I know the correct version?
If I add documentC, ES will return documentA, in the state before the ID
from documentB was added, so I guess I also get the wrong version returned
from ES
Maybe you need to use versioning, to ensure the 3rd write doesn't undo
(overwrite) the changes of the 2nd write?
See
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/optimistic-concurrency-control.html
Mike McCandless
http://blog.mikemccandless.com
On Fri, Jul 11, 2014 at