# tici_import

## Summary
Converts TiDB "import into" files (KV pairs plus table metadata) into Tantivy
index fragments via the shard writer/uploader pipeline.

## Public API
- Re-exported types: `ImportJobID`, `ImportJobMeta`, `ImportTask`,
  `ImportTaskID`, `ImportTaskParams`, `TiDBImportTaskID`
  (`components/tici_import/src/types.rs`).
- `ImportTaskParams::new`, `ImportTaskParams::split_with_job_info`:
  construct and expand per-index import tasks.
- `file::File`: `open`, `open_local`, `next`, `get_index_meta`, `commit_ts`,
  `index_info`, `pk_index_info`, plus `collation_name_to_id` and
  `DEFAULT_MAX_KV_BYTES` (`components/tici_import/src/file.rs`).
- `writer::Writer::write`: read import files and upload fragments
  (`components/tici_import/src/writer.rs`).

## Design Docs
- `docs/design/tici_import/overview.md`
- `docs/design/tici_import/pk_handle_synthetic_index_info.md`
- `docs/design/tici_import/hybrid_index_kv_format.md`

## Persistent Data Format
- Import file format version: `CURRENT_VERSION = 1`
  (`components/tici_import/src/file.rs`).
- If the format changes: update header parsing in
  `components/tici_import/src/file.rs`, update unit tests in
  `components/tici_import/src/file.rs`, and revalidate decoder assumptions in
  `components/tici_import/src/decoder.rs` and
  `components/tici_import/src/index_scan_executor.rs`.
