private synchronized void doReindex() {
        taskContextFactory.current().info(() -> "Gathering indexable items");
        LOGGER.info("{} - Re-indexing all content", RE_INDEX_JOB_NAME);
        securityContext.asProcessingUser(() -> {
            final List<EntityEvent> events = indexableMap.values()
                    .stream()
                    .takeWhile(docRef ->
                            !Thread.currentThread().isInterrupted())
                    .flatMap(contentIndexable ->
                            contentIndexable.listDocuments().stream())
                    .map(docRef ->
                            new EntityEvent(docRef, EntityAction.UPDATE))
                    .toList();

            LOGGER.logDurationIfInfoEnabled(
                    () ->
                            updateIndex(events),
                    LogUtil.message("Re-index {} items", events.size()));
        });
    }
Re-index all indexable items on the system
stroom-index/stroom-index-lucene980/src/main/java/stroom/contentindex/LuceneContentIndex.java