private void ensureIndexAndWait() {
        boolean isInitialised = ensureIndexAsync();
        if (!isInitialised) {
            try {
                // Make the user wait a wee bit if it is not initialised as this gives it a chance
                // to return a non-zero % so the user gets the impression that it is underway.
                isInitialised = indexInitialisedLatch.await(LATCH_TIMEOUT_MS, TimeUnit.MILLISECONDS);
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            }
        }

        if (!isInitialised) {
            final int updateCount = this.updateProgress.get();
            final int updateTotal = this.updateTotal.get();
            final String completionText;
            if (updateCount != 0 && updateTotal != 0) {
                final int pctComplete = (int) (updateCount / (double) updateTotal * 100);
                completionText = " (" + pctComplete + "% complete)";
            } else {
                completionText = "";
            }
            throw new RuntimeException("The content is currently being indexed"
                                       + completionText + ".\n" +
                                       "Please try again in a minute by clicking the Refresh button.");
        }
    }
Re-index all indexable items on the system
stroom-index/stroom-index-lucene980/src/main/java/stroom/contentindex/LuceneContentIndex.java