Document not inserted immediately

I am using couchbase with Play framework (2.2.3). I have created simple web app. Whenever i added a new document into couchbase, the result set would not get updated immediately. So i googling about it. I got some ideas with Stale option. But still it did not work. Here i pasted my code,

Query query = new Query(); query.setIncludeDocs(true); query.setDescending(true); query.setStale(Stale.FALSE);

I tried all option with Stale. But get same result.

Hi,

you also need to use PersistTo.MASTER on write to get it on disk so that the indexer can pick it up. This changes with 3.0, but for now thats the way it is.

Stale=FALSE & PersistTo.MASTER is your way to go if you need 100% accuracy and are OK to sacrifice performance,
Cheers
Michael