@Override
    public Terms terms(String field) throws IOException {
        ensureOpen();
        try {
            return cachedTerms.computeIfAbsent(field, f -> {
                try {
                    return MultiTerms.getTerms(in, f);
                } catch (IOException e) { // yuck!  ...sigh... checked exceptions with built-in lambdas are a pain
                    throw new RuntimeException("unwrapMe", e);
                }
            });
        } catch (RuntimeException e) {
            if (e
                    .getMessage()
                    .equals("unwrapMe") && e.getCause() instanceof IOException) {
                throw (IOException) e.getCause();
            }
            throw e;
        }
    }
This method is sugar for getting an {@link LeafReader} from
an {@link IndexReader} of any kind. If the reader is already atomic,
it is returned unchanged, otherwise wrapped by this class.
tika-eval/tika-eval-app/src/main/java/org/apache/tika/eval/app/tools/SlowCompositeReaderWrapper.java