How to use LiveQuery to get only modified documents?

Hi There,

I would like to get documents which are only modified based on date time in LiveQuery. What is the live query for that? For me all the documents are coming every time even documents are modified or not

Unfortunately this is simply the way that live query works. It will run periodically and if the results change it will send you the updated result set.

Thanks for letting know us.

you can use database change listener to track change of the documents changed. Live query runs above a query and fires only when the result of that query have changed. But it will always produce the complete result set and not the difference.

Sounds interesting, but what i observed is… i am getting duplicate documents on database change listener. i will cross verify.

It’s not duplicate documents but different revisions of the same document. So once you get the batch make that batch unique (create a set of unique document ids) and then use it as per requirement.

Yes same document with different revisions. can you please share document link about batch unique or crate as set of unique document ids in couchbase documents.