Skip to content

Incremental engine for long horizon agents 🌟 Star if you like it!

docs(getting-started): the Why page says what `-L` does and where the vector size comes from (#2893)

Jiangzhou7df4cc556922
diff --git a/docs/src/content/docs/getting_started/overview.mdx b/docs/src/content/docs/getting_started/overview.mdx
index aa587a41..41418bb1 100644
--- a/docs/src/content/docs/getting_started/overview.mdx
+++ b/docs/src/content/docs/getting_started/overview.mdx
@@ -177,7 +177,7 @@ The code has three parts:
1. **Connect a source.** <Lang only="python">`localfs.walk_dir()` lists the Markdown files. With `live=True`, it can also watch the folder.</Lang><Lang only="rust">`walk_dir()` lists the Markdown files. With `.live()`, it can also watch the folder.</Lang>
2. **Write the processing logic.** `process_file` handles one file. It splits the text, embeds each chunk, and declares one row for each chunk. <Lang only="python">`mount_each()`</Lang><Lang only="rust">`mount_each_live()`</Lang> runs it once for each file. <Lang only="python">`memo=True`</Lang><Lang only="rust">`memo`</Lang> lets CocoIndex skip a file that did not change, and the built-in `embed()` caches each embedding.
-3. **Declare the target.** <Lang only="python">The `DocChunk` class defines the columns. `mount_table_target()` declares the table, and `declare_row()` declares each row.</Lang><Lang only="rust">`declare_row()` declares each row. The full example declares the table with `postgres::mount_table_target()`.</Lang> `IdGenerator` gives an unchanged chunk the same id in every run, so its row stays as it is. CocoIndex does the writes.
+3. **Declare the target.** <Lang only="python">The `DocChunk` class defines the columns, with the vector size from the model. `mount_table_target()` declares the table, and `declare_row()` declares each row.</Lang><Lang only="rust">`declare_row()` declares each row. The full example declares the table with `postgres::mount_table_target()`.</Lang> `IdGenerator` gives an unchanged chunk the same id in every run, so its row stays as it is. CocoIndex does the writes.
{/* Rust: examples/rust/text_embedding/src/main.rs (process_chunk and process_file as they are there, without the doc comments; the end of index(), without the comments) */}
<LangTabs>
@@ -296,7 +296,7 @@ ctx.mount_each_live(&"process_file", files, move |ctx, file: FileEntry| {
</Fragment>
</LangTabs>
-<Lang only="python">`process_file` is still a loop over the chunks of one file. The last line makes the pipeline an app, and `cocoindex update main.py` runs it. </Lang>The code declares what the target contains. It has no logic for the six jobs.
+<Lang only="python">`process_file` is still a loop over the chunks of one file. The last line makes the pipeline an app, and `cocoindex update main.py` runs it. With `-L`, the app keeps running and watches the folder. </Lang>The code declares what the target contains. It has no logic for the six jobs.
Suppose that the folder has two files, `a.md` and `b.md`, and that each file has two chunks.
After the first run, the target has four rows: