reindex_documents
Reindex documents in the knowledge base. Use force=True after filesystem edits or full_rebuild=True for model upgrades or corruption.
Instructions
Index or reindex all documents in the knowledge base.
Mutating — modifies the vector index. CPU/IO intensive for full_rebuild (~6 min for 200 docs).
Args: force: If True, smart reindex (detects changed files + rebuilds BM25 index). Fast (~5s for 200 docs). Use after manually editing files on disk outside of add_document(). full_rebuild: If True, nuclear rebuild — deletes all vectors and re-embeds everything from scratch. Use only if the embedding model changed or the index is corrupted.
Returns: JSON string with indexing statistics (docs processed, added, skipped, errors).
Usage: Normal workflow does not require this — add_document(), update_document(), and add_from_url() all auto-index on call. Use force=True only after direct filesystem edits. Use full_rebuild=True only for model upgrades or index corruption. No arguments runs a fast incremental pass.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| full_rebuild | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |