feat(ftindex): read Java full-text archives via paimon-ftindex-core#563
feat(ftindex): read Java full-text archives via paimon-ftindex-core#563JunRuiLee wants to merge 5 commits into
Conversation
|
I’ve completed the implementation and am currently waiting for the paimon-full-text release. Once it’s available, I’ll submit the PR. I’d really appreciate your review then. |
Thanks for the heads-up! Could you share which part you've been working on? Tracking issue: #567. You're very welcome to review once it's up. This PR (and #568) is only waiting on the paimon-ftindex-core crates.io release — the dependency is pinned to a GitHub git tag for now, and as soon as the crate is published I'll switch that to the crates.io version and mark the PRs ready. You're very welcome to review once they're up. |
|
Thanks for sharing #568. I've opened #571 as a draft so the scope and implementation are visible. My work focuses on the existing non-primary-key/global-index full-text path and DataFusion integration, rather than the primary-key full-text and hybrid search path covered by #568. It migrates the legacy in-repository Tantivy implementation to There is some overlap with #563 in the dependency and reader wiring. I'm happy to rebase on or reuse that foundation to avoid duplication. Please let me know which integration order you would prefer. I'll also review #568 separately. |
Thanks — the scope is clear now, and I think our work is complementary with essentially no functional overlap: you're migrating the append/global-index full-text path (and DataFusion) onto paimon-ftindex-core, and #568 covers the primary-key full-text + hybrid path. The only real intersection is the shared piece: the paimon-ftindex-core dependency + the FullTextArchiveReader wiring (currently in #563). I'd suggest we land that reader foundation first, as its own small PR (#563), and then both of our stacks — your global-index path and my PK path — rebase onto it so the dependency and reader live in one place. That also lets us settle one shared detail: the pinned tag (I'm on v0.1.0-rc4, you're on v0.1.0-rc5) — we should converge on one and switch to the crates.io version before merging, since a git-only dependency blocks publishing. Works for me to have #563 go in first; happy to adjust the reader's API if your global path needs anything from it. |
|
Thanks, that ordering works for me. One API requirement from #571: global-index archives may be stored on remote FileIO and can be large, so the current implementation intentionally avoids reading the entire archive into memory. It adapts range reads from Could #563 make I'll keep #571 as a draft and rebase it onto #563 once we agree on this API and the foundation lands. |
Allow both whole-file (SliceReader) and streaming/range-read strategies for full-text archive access. Adds from_seek_read constructor; keeps from_input_file as a convenience wrapper for the whole-file case. Addresses coordination with global-index full-text path.
Done — I've updated #563 with a generic |
|
Thanks for the quick update! I tested #571 on top of the latest #563 and integrated |
Purpose
First step of mirroring Java Paimon's primary-key full-text search into the Rust read side. Java's full-text index is backed by a shared native Rust core,
paimon-ftindex-core(public repoapache/paimon-full-text, tantivy 0.26.1), which the Java/Python bindings wrap via JNI/ctypes. This PR lets the Rust reader depend on that same core directly (no JNI needed), so it can read the on-disk archive format Java writes.This is a deliberately small, self-contained foundation slice: dependency wiring + a thin reader wrapper + round-trip tests. It de-risks the external dependency (does it fetch and build here?) before any of the primary-key scan/read machinery is built on top.
Brief change log
paimon-ftindex-core(tagv0.1.0-rc4), wired into the existingfulltextcargo feature viadep:syntax.crates/paimon/src/ftindex/withFullTextArchiveReader:from_input_file(&InputFile)— reads the archive bytes and opens the core reader over an in-memorySliceReader.search(query_json, limit)— JSON-DSL query, returnsFullTextHits { row_ids, scores }.search_with_include(query_json, limit, RoaringTreemap)— restricts results to a live-row allow-list (thewithIncludeRowIdsequivalent).crate::Error, no silent fallback).Out of scope (later PRs): shared PK-index-layer generalization,
CoreOptionsfull-text options, PK full-text scan/read, hybrid-on-PK, and migrating the existing append/data-evolution full-text path off rawtantivy 0.22onto the core.Tests
ftindex::reader::tests::test_round_trip_search_returns_expected_rows— build an archive with the core writer, read it back, assert the correct row-ids/scores.ftindex::reader::tests::test_search_with_include_restricts_to_allow_list— all docs match; the roaring include-filter restricts results to the allow-list subset (also validates cross-crateroaring 0.11compatibility).cargo test -p paimon --features fulltextgreen (lib 1724 passed / 0 failed);cargo clippy -p paimon --lib --tests --features fulltext -- -D warningsclean; default (no-feature) build andcargo build -p paimon-datafusion(Send boundary) both pass.API and Format
No public API change to existing paths and no storage-format change. Adds a new feature-gated reader over the existing Java-written full-text archive format (v1), read through the shared
paimon-ftindex-coreengine. Thefulltextfeature transitionally pulls both tantivy 0.22 (legacy append path) and 0.26 (via the core); the duplicate is removed when the append path converges onto the core in a later PR.Documentation
No documentation changes; module-level doc comments describe the new reader.