Reacting to Node Adding/Removing/Changing

This is probably fine – unless your documents are humongous, scanning them is cheap.

You don’t need to use filterTransaction – you can simply react to transactions as they are dispatched. To see the extent of the document ‘touched’ by a given transaction, you can call forEach on each step map in its mapping property, but doing this is kind of subtle as each step will have its positions expressed relative to the document as it was when that step was applied, and later steps might move those positions again.

So I’d say go with the first approach, and when you somehow find that that is too slow, implement the second.