Skip to content

Solr Cell: index Tika 4.x tk:chunks into a dense_vector field - #4863

Draft
epugh wants to merge 5 commits into
apache:mainfrom
epugh:solr-cell-tika4-chunks
Draft

Solr Cell: index Tika 4.x tk:chunks into a dense_vector field#4863
epugh wants to merge 5 commits into
apache:mainfrom
epugh:solr-cell-tika4-chunks

Conversation

@epugh

@epugh epugh commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

Tika 4.x's tika-inference module can split a parsed document into semantically-bounded chunks (splitting on Markdown headings/paragraphs) and attach a precomputed embedding vector to each, via a server-side embedding filter (e.g. openai-embedding-filter). This PR teaches Solr Cell (ExtractingRequestHandler) to read those chunks back out and index them directly.

Solution

Mostly AI generated... I need to better understand what Tika 4 views as it's place in the world if we aren't just capturing attributes from a tree structure, and indeed, appear to have dumped the tree concept in favor of a markdown file!

Maybe these days, all that rich parsing and extraction we used to have has turned into "just give me markdown", but what about images? What about hOCR?

Tests

Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

solrbot and others added 5 commits September 1, 2026 01:02
…xml.

This is mostly a "hey, look, I got us to tika 4", but it feels like its still trying to push Tika 4 into a tika 3 approach, when Tika wants to be different.
Adds a new tikaserver.chunks parameter to the ExtractingRequestHandler that reads
Tika 4.x's tk:chunks -- text chunks with precomputed embedding vectors, produced by a
server-side Tika Server embedding metadata filter such as openai-embedding-filter --
and indexes one Solr document per chunk into a dense_vector field, enabling kNN search
over documents extracted with Solr Cell.

Demonstrated end-to-end in a new BATS test (test_extraction.bats) using a small
stdlib-only mock OpenAI-compatible embeddings server, and covered by new
TikaServerExtractionBackendTest cases against a live Tika 4.0.0 container.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Dependency upgrades module:extraction tool:build admin-ui tests labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

admin-ui dependencies Dependency upgrades documentation Improvements or additions to documentation module:extraction tests tool:build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants