pub struct Config {
pub enabled: bool,
pub roots: Vec<PathBuf>,
pub ignore_names: Vec<String>,
pub ignore_paths: Vec<PathBuf>,
pub include_extensions: Vec<String>,
pub exclude_extensions: Vec<String>,
pub external_drives: bool,
pub refresh: Duration,
}Expand description
What to index and what to return. Comes from the user’s configuration.
Fields§
§enabled: boolWhether file search runs at all.
roots: Vec<PathBuf>Trees to index. Defaults to the user’s home directory.
ignore_names: Vec<String>Directory names never to index, in addition to the built-in list.
Applied at index time, so excluding a large tree makes the index both smaller and faster to build — unlike a query-time filter, which pays for the paths anyway.
ignore_paths: Vec<PathBuf>Absolute paths never to index.
include_extensions: Vec<String>If non-empty, only files with these extensions are returned.
Applied at query time rather than index time: it is the setting most likely to be changed on a whim, and re-indexing after every change would be a poor trade for a filter this cheap.
exclude_extensions: Vec<String>Extensions never returned, beyond the built-in noise list.
external_drives: boolAlso index mounted external volumes (NTFS drives and the like).
Off by default: these are frequently multi-terabyte, and indexing one takes minutes rather than seconds.
refresh: DurationHow stale the index may get before it is rebuilt.