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)
| 89 | /// This is the fastest path for keeping the index current after a single |
| 90 | /// file edit — cheaper than a full rebuild or stale check. |
| 91 | pub fn notify_and_commit(repo_root: &Path, changed_path: &Path) -> Result<(), ContentSearchError> { |
| 92 | let config = content_config(repo_root); |
| 93 | let index = Index::open(config)?; |
| 94 | index.notify_change_immediate(changed_path)?; |
| 95 | Ok(()) |
| 96 | } |
| 97 | |
| 98 | /// Incrementally refresh the content index for a set of repo-relative paths |
| 99 | /// that changed (e.g. the files touched by a recorded change) and persist the |
nothing calls this directly
no test coverage detected