I have a view and a live query like this
var tagsView = database.viewNamed("tags")
tagsView.setMapBlock({ (doc, emit) in
let type = doc["type"] as! String
if type == "tag" {
let order = doc["order"] as! Int
emit(order, nil)
}
}, version: "1")
var tagsQuery = tagsView.createQuery().asLiveQuery()
tagsQuery.addObserver(self, forKeyPath: "rows", options: [], context: nil)
tagsQuery.start()
And when I update ‘order’ property, ‘observeValueForKeyPath’ is called.
But when I update other property, for example ‘tag’, ‘observeValueForKeyPath’ is not called.
Is this a feature? or a bug?
If this is a feature, is there a way to force refresh?
‘CBLLiveQuery.queryOptionsChanged’ seems not helpful.