tree: 846c5fe913cc3c37651b9fb4d25220635b769d75
  1. english_simple.archive
  2. english_simple.golden.json
  3. production_sample.archive
  4. README.md
test/test_data/java_tantivy_fixtures/README.md

Java -> C++ tantivy cross-read fixtures

Generated on 2026-04-23 for paimon-tantivy-java-compat-test.

Contents

FilePurpose
english_simple.archiveA BE archive produced by paimon-java's TantivyIndexWriter + packIndex path; 10 plain-English documents, row_ids 0..9
english_simple.golden.jsonHuman-readable golden file: expected row_ids for each query type

Pinned versions

ComponentVersion
tantivy crate0.22.1
paimon-tantivy-jnilatest git sha at generation time (commit lives in the paimon repo)
schemarow_id u64 stored+indexed+fast + text TEXT
archive byte formatJava-compatible, big-endian, no version header

Upgrading any component (especially the tantivy version) can make the segment files binary-incompatible — regenerate the fixtures:

# 1. Build the Java native lib (if the Rust side changed)
cd /path/to/paimon/paimon-tantivy/paimon-tantivy-jni/rust && cargo build --release
cp target/release/libtantivy_jni.dylib \
   ../src/main/resources/native/darwin-aarch64/

# 2. mvn install + run the fixture generator
cd /path/to/paimon
mvn install -pl paimon-tantivy/paimon-tantivy-index -am -DskipTests -Denforcer.skip=true
mvn -pl paimon-tantivy/paimon-tantivy-index test \
    -Dtest=TantivyIndexFixtureGen -DfailIfNoTests=false \
    -Denforcer.skip=true \
    -DfixtureOutDir=/path/to/paimon-cpp/test/test_data/java_tantivy_fixtures

Verification

xxd english_simple.archive | head -1
# 00000000: 00 00 00 16 ...   <- BE int32 file_count = 22 (Java does not
#                                force-merge, so multiple segments)

Related code