This fix relates to the issue raised in #15, plus another bug I identified while testing my fix for that issue - both of which seem to be caused by some of the strapi changes in version 5.
Fix index all action unindexing all documents: the default search results were only for draft articles which all had no publishedAt timestamp, causing them to be requested for deletion (https://docs.strapi.io/dev-docs/api/document-service/status).
Fix individual document create/update handling: a new document (string) ID has been added (which identifies the document across both its draft & published versions), which didn't match the (int) ID being used in the queries. I've updated the query to lookup documents post create/update to use the new documentID so that results get returned, and am filtering to only include published states to ensure the correct version is returned.
This fix relates to the issue raised in #15, plus another bug I identified while testing my fix for that issue - both of which seem to be caused by some of the strapi changes in version 5.