开发与 ITReddit 原帖
APP Request: Spotlight Indexing
Is there an app that gives more control on the Spotlight Indexing? Such as pausing it, scheduling it, see what it is indexing, etc
已收集讨论
7 条已收集
7条已收集10条 Reddit 标称评论
Is there an app that gives more control on the Spotlight Indexing? Such as pausing it, scheduling it, see what it is indexing, etc
已收集讨论
You could use cron jobs. Thats the best imo. It’s easy to setup and u can prob get a GUI app for editing / making cron jobs
No app I know of, but the built-in `mdutil` gets you most of it. `sudo mdutil -a -i off` pauses indexing, `-i on` resumes, `mdutil -s /` shows status. To see what it's working on, watch `mds_stores` and `mdworker_shared` in Activity Monitor. There's no native scheduling, but a small launchd job flipping it off at night does the trick. And if it's constantly re-indexing, add the churny folders (node_modules, build dirs) to System Settings > Spotlight > Search Privacy, that usually fixes the cause.
i would avoid leaving indexing off long-term. Safer path: check whether mds_stores or mdworker is actually busy while the slowdown happens, then exclude folders that churn a lot like build outputs, VM images, downloads, or big sync folders. If it only hurts during work hours, pause it temporarily and turn it back on later so Finder/Mail/search do not slowly get weird.
For most of this, the built-in tools are probably the real interface. `mdutil -s /` for status, `sudo mdutil -a -i off` / `on` for disabling and re-enabling indexing, and Activity Monitor for `mds_stores` / `mdworker_shared`. But if Spotlight is slowing the machine down often, I’d look for the cause before scheduling around it. Common culprit is churny folders: `node_modules`, build outputs, generated media, VM folders, large synced folders. Adding those to Spotlight Privacy usually helps more than trying to micromanage indexing itself. A GUI for this would be useful, but it would mostly be wrapping `mdutil`, privacy exclusions, and maybe launchd scheduling.
Unfortunately I don't think Apple provides exposed controls for this, and if there's private frameworks that potentially allow this, they could be nuked/changed at any time. Curious on why you'd want verbose control over it? A lot of things on macOS rely on Spotlight, which is why it's not recommended to disable and just let it do it's thing.
I find sometimes when its indexing, it slows down my computer.
That's fair, u/actvt_io posted the CLI commands you can use to check this. But as for something native and app focused, if one was to create this, it wouldn't be using frameworks/api calls and likely delegate to said commands.