I’m trying to persistently full-text index a Y.Array. The idea would be, every time an update comes, understand what changed and index, re-index or de-index the new / changed / deleted elements of the array.
Is there a way to (directly or indirectly) understand what changed in one update? I see from other discussions that the recommended solution for similar problems is converting to JS array and debounce the re-index of the whole array for every update, but indexing is an expensive operation and doing so would be really inefficient as the array grows.
ytext.observe(event => {
event.delta // is a quill delta - https://quilljs.com/docs/delta/
})
If you only want to observe the changes that happen when applying specific updates, you could simply register an observer, and then unregister after the update has been applied.