private void updateDocInIndex(final TaskContext taskContext,
                                  final EntityEvent event,
                                  final IndexWriter writer) {
        updateProgress.incrementAndGet();
        try {
            switch (event.getAction()) {
                case CREATE -> {
                    setTaskContextInfo(
                            taskContext, event, "Adding", updateProgress, updateTotal);
                    addDoc(taskContext, writer, event.getDocRef());
                }
                case UPDATE -> {
                    setTaskContextInfo(
                            taskContext, event, "Updating", updateProgress, updateTotal);
                    deleteDoc(writer, event.getDocRef());
                    addDoc(taskContext, writer, event.getDocRef());
                }
                case DELETE -> {
                    setTaskContextInfo(
                            taskContext, event, "Deleting", updateProgress, updateTotal);
                    deleteDoc(writer, event.getDocRef());
                }
            }
        } catch (final Exception e) {
            LOGGER.error(e::getMessage, e);
        }
    }
Re-index all indexable items on the system
stroom-index/stroom-index-lucene980/src/main/java/stroom/contentindex/LuceneContentIndex.java