@Override
    public void report(FetchEmitTuple t, PipesResult result, long elapsed) {
        if (! shouldReport(result)) {
            return;
        }

        Metadata metadata = new Metadata();
        metadata.set(parseStatusKey, result.getStatus().name());
        metadata.set(parseTimeKey, Long.toString(elapsed));
        if (result.getEmitData() != null && result.getEmitData().getMetadataList() != null &&
                result.getEmitData().getMetadataList().size() > 0) {
            Metadata m = result.getEmitData().getMetadataList().get(0);
            if (m.get(ExternalProcess.EXIT_VALUE) != null) {
                metadata.set(exitValueKey, m.get(ExternalProcess.EXIT_VALUE));
            }
        }
        //TODO -- we're not currently doing anything with the message
        try {
            if (includeRouting) {
                openSearchClient.emitDocument(t.getEmitKey().getEmitKey(),
                        t.getEmitKey().getEmitKey(), metadata);
            } else {
                openSearchClient.emitDocument(t.getEmitKey().getEmitKey(),
                        null, metadata);

            }
        } catch (IOException | TikaClientException e) {
            LOG.warn("failed to report status for '" +
                    t.getId() + "'", e);
        }
    }
As of the 2.5.0 release, this is ALPHA version.  There may be breaking changes
in the future.
tika-pipes/tika-pipes-reporters/tika-pipes-reporter-opensearch/src/main/java/org/apache/tika/pipes/reporters/opensearch/OpenSearchPipesReporter.java