HapiGo 帮助
搜索
⌃K

文件索引排除

去除不必要的文件,提高索引性能
本文内容仅适用于 v2.6.1,后续会增加可视化设置面板。配置前建议先备份一下空白文件,以便发生问题时可以恢复。
自 v2.6.1 起,HapiGo 已完全使用自研的索引方案。因此,每次 HapiGo 开启时,会对搜索范围内的文件进行索引。
索引的速度很快,在文件不多的电脑上,几乎没有影响。但是,如果文件数超过 50 万,可能会导致 CPU 持续高占用、能耗升高、电脑发热。所以,建议文件数较多的用户,排除一些不必要的文件路径。减少索引文件数,减少索引时长。
查询文件索引数量:点击菜单栏 HapiGo 图标 - 打开偏好设置 - 切换到文件搜索标签 - 点击「文件索引检查」
查询索引文件数量

配置文件路径

~/Library/Application Support/Hapigo/Data/Customize/FileIndexIgnorePaths
复制以上路径,在 HapiGo 中粘贴。然后使用文本编辑类应用可打开编辑。

配置说明

ignorePaths:跳过指定路径下的所有文件,包括路径本身
ignorePaths: ["~/MyPrivateFolder"] 会跳过 ~/MyPrivateFolder 和 ~/MyPrivateFolder/*
ignoreFolders:按文件夹名称排除索引,包括文件夹本身
ignoreFolders: ["MyPrivateFolder"] 会跳过 ~/MyPrivateFolder 和 ~/MyPrivateFolder/* 和 ~/Documents/MyPrivateFolder 和 ~/Documents/MyPrivateFolder/* 等
ignorePackages:按文件夹名称排除索引,不包括文件夹本身
ignorePackages: ["MyPackage"] 会跳过 ~/MyPackage/* 和 ~/Documents/MyPackage/* 等
ignorePathExtensions:跳过指定文件类型
ignorePathExtensions: ["pdf"] 会跳过所有 pdf 文件
ignoreFiles:跳过指定文件
ignoreFiles: ["~/Downloads/MyPrivateDocument"] 会跳过 ~/Downloads/MyPrivateDocument 文件
ignoreKeywords:跳过包含关键字的路径
ignoreKeywords: ["MyPrivateDocuments", "ChatFile"] 会跳过所有 ~/Documents/MyPrivateDocument/license 和 ~/Downloads/MyPrivateDocument/license 和 ~/Documents/2022-1-1-ChatFile 等文件
indexVolumes: 暂不可用

综合示例

{
"indexVolumes" : [
""
],
"ignoreFolders" : [
""
],
"ignorePackages" : [
"node_modules",
"pythonLibraryFolder"
],
"ignoreFiles" : [
"~/Documents/学习资料.mp4",
"~/Documents/重要文档.docx"
],
"ignorePathExtensions" : [
"pdf",
"png"
],
"ignorePaths" : [
"~/Downloads/demo folder",
"~/Desktop/Projects"
],
"ignoreKeywords" : [
""
]
}