CloudSearch's results are only Eventually Consistent.
In 95% of my application, this is an acceptable tradeoff for the performance and redundancy that it provides.
In that last 5% though, I find myself POSTing a new SDF Document, and then immediately running a query which I need to reflect the POST that I just did.
Currently, I have a cobbled together solution that involves polling CloudSearch until the results are what I expect, directly after the POST. Unfortunately this has a host of issues ranging from increased cost ($) associated with doing extra reads to race conditions when I have multiple users.
Is there any best practice for dealing with this situation?
xpost from AWS Forums: https://forums.aws.amazon.com/thread.jspa?messageID=470636񲹬
EDIT: Additional info about my specific use case.
I'm taking the results of a search with a number of boolean queries on it, and I want to be able to update one or more documents such that they may no longer should appear in the query, then refresh the view to show the results.
Specifically, I have a bunch of documents with a boolean marking them as "archived"
When I am looking at them in the unarchived view, and then mark them as archived, I want to be able to refresh the view without showing those items.
I'm also using CloudSearch for sorting/filtering/paging, which makes it difficult to insert or modify local copies