Hacker News new | past | comments | ask | show | jobs | submit login

In my experience, spotlight re-indexing mostly happens if you run out of disk space and the OS decides to drop spotlights caches in favor of swap space. If you keep an eye on the size of your swap files (in the /var/vm dir), you can see when things go nuts and take corrective action before the index gets whacked.



IMHO, this is a "bug" because if you are running on battery, the indexing is a problem and it is also a problem if you are using spotlight. Is there an option to ensure that the spotlight cache is not deleted?


Spotlight has given me so many headaches in the last few weeks that I'm seriously considering investing the time to understand it well enough to build an app to wrestle it to the ground and beat it over the head with a big stick. If only there'd be a reason to do it other than "gain control over my life again" ..


If you just want to beat it over the head with a stick, you can simply turn indexing off on a per-volume basis:

    sudo mdutil -i off /
You can also exclude certain directories or volumes in the Privacy section of Spotlight preferences.


Yeah this makes Xcode and Mail unusable in my opinion so its not really an option .. I simply have to empty the disk and let Spotlight re-index it. One of those facts of MacOS life ..


But if you turn it off, then you can't use Spotlight to find files at all, whereas if it is on, then one can use it.


Well, I'd buy that tool. Spotlight watchdog.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: