Thursday, March 26, 2009

Spotlight Index Not Updated

This was my problem on Mac OS X Leopard. I changed some tags using Quicksilver, but some of my smart folders depending on the tags were not updated with the new files. I did some search and thought I needed to rebuild the index using the mdimport command. However, the real cause of problem was that the index was somehow made read-only.

The normal status of the spotlight index can be shown using "mdutil -sa", as

/:
Indexing enabled.

which shows that the indexing is enabled. However, last time I had this problem, the status was something like:

/:
Index is read-only.

As the index was read-only, the mds couldn't update the index, and so the changes on the tags were not reflected in the smart folders. To solve this, I used the naive method: reboot. After that, the indexing was enabled again. And the files tagged appeared appropriately in the smart folders again. (If not, the mdimport command might be used to update the index.)

It seems that I need to reboot my MacBook more often from now on.

1 comment: