Skip to content

TIKA-4672 - add an Elasticsearch emitter#2622

Open
tballison wants to merge 6 commits intomainfrom
TIKA-4672-es-emitter
Open

TIKA-4672 - add an Elasticsearch emitter#2622
tballison wants to merge 6 commits intomainfrom
TIKA-4672-es-emitter

Conversation

@tballison
Copy link
Contributor

Thanks for your contribution to Apache Tika! Your help is appreciated!

Before opening the pull request, please verify that

  • there is an open issue on the Tika issue tracker which describes the problem or the improvement. We cannot accept pull requests without an issue because the change wouldn't be listed in the release notes.
  • the issue ID (TIKA-XXXX)
    • is referenced in the title of the pull request
    • and placed in front of your commit messages surrounded by square brackets ([TIKA-XXXX] Issue or pull request title)
  • commits are squashed into a single one (or few commits for larger changes)
  • Tika is successfully built and unit tests pass by running ./mvnw clean test
  • there should be no conflicts when merging the pull request branch into the recent main branch. If there are conflicts, please try to rebase the pull request branch on top of a freshly pulled main branch
  • if you add new module that downstream users will depend upon add it to relevant group in tika-bom/pom.xml.

We will be able to faster integrate your pull request if these conditions are met. If you have any questions how to fix your problem or about using Tika in general, please sign up for the Tika mailing list. Thanks!

tballison and others added 6 commits February 17, 2026 21:13
- Add tika-pipes-elasticsearch plugin with ElasticsearchClient,
  ElasticsearchEmitter, and PF4J plugin wiring.
- Add Elasticsearch integration tests with Testcontainers.
- Refactor shared logic in OpenSearchClient.

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds an Elasticsearch-compatible emitter and pipes reporter as a new
tika-pipes plugin, avoiding use of the trademarked "Elasticsearch" name
in class and package identifiers (plugin id: es-emitter).

Key changes:
- New plugin: tika-pipes-elasticsearch with ESEmitter, ESPipesReporter,
  ESEmitterConfig, ESEmitterFactory, ESPipesPlugin; all classes under
  org.apache.tika.pipes.{emitter,reporter,plugin}.es packages
- ESClient talks directly to the _bulk REST endpoint using Apache
  HttpClient (ASL v2), avoiding the SSPL-licensed ES Java client
- Reporter writes per-document parse status (PARSE_SUCCESS,
  PARSE_SUCCESS_WITH_EXCEPTION, EMIT_SUCCESS, OOM/TIMEOUT) to a
  dedicated ES index, mirroring the OpenSearch reporter
- HttpClientFactory: add verifySsl flag (default false preserves
  existing trust-all behaviour); when true uses JVM default trust store
  and hostname verification; copy() propagates the flag
- VectorSerializer: switch to BIG_ENDIAN byte order to match ES 9.3+
  dense_vector base64 format (big-endian IEEE 754 float32)
- Security: fix JSON field injection in ESClient.isValidJson by using
  JsonParser with explicit trailing-token check; override
  ESEmitterConfig.toString() to redact apiKey from logs
- Integration tests: 6 Docker-based tests (Testcontainers, ES 9.3.0)
  covering basic FS→ES pipeline, reporter validation, RMETA/PARENT_CHILD
  attachment strategies, upsert, and kNN vector search; vector test uses
  base64 on ES >= 9.3, falls back to float-array bulk indexing on older
  versions
- Documentation: ES emitter and reporter sections in pipes/index.adoc
  with configuration tables and SSL warning

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant