Notify the index about a single changed file and commit immediately. This is the fastest path for keeping the index current after a single file edit — cheaper than a full rebuild or stale check.
(repo_root: &Path, changed_path: &Path)
| 65 | /// This is the fastest path for keeping the index current after a single |
| 66 | /// file edit — cheaper than a full rebuild or stale check. |
| 67 | pub fn notify_and_commit(repo_root: &Path, changed_path: &Path) -> Result<(), ContentSearchError> { |
| 68 | let config = content_config(repo_root); |
| 69 | let index = Index::open(config)?; |
| 70 | index.notify_change_immediate(changed_path)?; |
| 71 | Ok(()) |
| 72 | } |
| 73 | |
| 74 | /// Incrementally refresh the content index for a set of repo-relative paths |
| 75 | /// that changed (e.g. the files touched by a recorded change) and persist the |
nothing calls this directly
no test coverage detected