Searching with grouped words and operators

As prompted in another thread I started on this topic, I’ve been trying to implement this Algolia plugin in Kirby 3. Rebuilding my search index works as expected when I use algolia()->index() in a template.

However, the search index is not updated when I modify an existing page or create a new page in the panel. The only way it appears to be working is when I call algolia()->index(). Am I missing something really basic like a hook somewhere? Any help would be appreciated!