It is my first time to use CBL so perhaps I am making a mistake. Basically, what I wanted was to run a query and listen to it. Initially I thought it would return documents that got inserted later on but likely that’s not the case? Documentation says you can continue to listen to changes made to documents that were previously returned in the query but I am not seeing those changes. My code is:
ListenerToken token = query.addChangeListener(change->{
Throwable error = change.getError();
if (error == null){
liveQueryProps.putBoolean("error", false);
logMe(change.getResults().allResults());
};
});
the first time, the log shows correct results. But when I update one of those documents, I don’t see a second log. I was under the assumption it would listen to those changes and spit out a log of those changes too.
While we are at it, is there a way to get newly inserted documents that are satisfied by the query or I have to re-run the query?