Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am guessing that when disk space runs low, it automatically deletes the Spotlight index to make room for virtual memory. Then when space becomes available it reindexes. But I'm not sure about that.

Since my MacBook Air SSD is only 128 GB, I often work with little free disk space and the re-indexing drives me crazy.

I tried to disable Spotlight, remove its index and reindex. Also check filesystem and repair permissions. In diagnostic reports (~/Library/Logs/DiagnosticReports/) nothing about reindexing is mentioned.

You can say that I should control the amount of free space but also should be another way. Disabling Spotlight isn't the option.

crosspost: https://discussions.apple.com/message/17321018#17321018

share|improve this question
    
Do you have lion? Because it might cause some of your folders to corrupt and thus spotlight can't index the files inside the folder. Try running disk utility on your partitions and repair it if there are any problems –  theAmateurProgrammer Jan 17 '12 at 23:41
    
This behaviour is indeed pretty stupid. Maybe one could somehow include virtal memory in the free space calculation or subtract a fixed value from it so that the system recognizes the storage as full earlier. –  mcb Jul 20 at 23:20

1 Answer 1

mdutil is the command line tool that controls Spotlight.

Looking at the mdutil man page, there doesn't appear to be an option to make the index persistent regardless of disk space. There is mention that "indexing may be delayed due to low disk space or other conditions".

One idea that comes to mind is that you can take away write permissions on your index files for all users, this should prevent them from being deleted, but it would also prevent them from being updated, and a static index is likely not desirable, and could cause errors. This might be worthy of testing, but I don't expect it would go very well.

It doesn't appear that Spotlight is designed to work in the way you are looking for. I would suggest submitting a feature request to Apple.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.