# Task 01: Creator Text Indexing ## Goal Add a separate Tantivy text index for creator entities, parallel to the existing item text index. Creator text fields are declared in the schema via `creator_text_field()`. The background syncer enqueues writes from `write_creator()`. ## Files to Modify - `tidal/src/schema/validation.rs` — add `creator_text_fields` vec to `Schema` and `SchemaBuilder` - `tidal/src/schema/mod.rs` — re-export nothing new (types already exported) - `tidal/src/db/mod.rs` — add creator text index fields, spawn creator syncer, extend `write_creator()`, add `reload_creator_text_index()` ## Schema Changes Add `creator_text_fields: Vec` to both `Schema` and `SchemaBuilder`. ```rust impl SchemaBuilder { pub fn creator_text_field(&mut self, key: &str, field_type: TextFieldType) -> &mut Self { self.creator_text_fields.push(TextFieldDef { key: key.to_owned(), field_type }); self } } impl Schema { pub fn creator_text_fields(&self) -> &[TextFieldDef] { &self.creator_text_fields } } ``` ## TidalDb Changes Add three new fields parallel to `text_index`, `text_tx`, `text_syncer_thread`: ```rust creator_text_index: Option>, creator_text_tx: std::sync::Mutex>>, creator_text_syncer_thread: std::sync::Mutex>>>, ``` Spawn in `from_parts()` using the same pattern as the item syncer. In `write_creator()`, enqueue to `creator_text_tx` when present. Add `reload_creator_text_index()` helper for tests. ## Acceptance Criteria - `SchemaBuilder::creator_text_field()` compiles - Writing a creator with matching metadata enqueues to the creator text index - `reload_creator_text_index()` reloads the reader for test synchronization - Existing item text index is unaffected