Problems in getting updated document after updation



After updating a document by DocumentUpdater interface (i put new property and return true in update() callback) when i’m querying that document, revision Id is same and I get old content of that document. however if I restart app, revision id is different (updated) for that document and I get updated content. this must be something minor that i’m missing. can anyone help?


Can you show a bit of code to illustrate what you’re doing?



   if (database != null) {
                    Query query = database.getView(VIEW_TIMESTAMP).createQuery();
                    List<Object> list = new ArrayList<>();

                QueryEnumerator result;
                try {
                    result =;
                    for (int i = 0; i < result.getCount(); i++) {
                        QueryRow row = result.getRow(i);
                        Document doc = row.getDocument();

                            doc.update(new Document.DocumentUpdater() {
                            public boolean update(UnsavedRevision newRevision) {
                                Map<String, Object> properties = newRevision.getUserProperties();
                                properties.put(key, value);
                                return true;

                } catch (CouchbaseLiteException e) {

after this if check revisionId of this docs. they are unchanged, same as it were before update. till I reload the app. after reloading, revision Id is updated and i get updated content.