I have a directory of plain text files in ~/Library/Application Support/MyApp/Spotlight/. I understand that Spotlight stopped indexing the Library in 10.5, but is there a way to force Spotlight to include a single sub-directory in its index?

I've tried wrapping mdimport in an NSTask, and the debug output says that the file has been imported, but it does not show up in Spotlight results.

@bbum's answer here leads me to believe this should be trivial, but I'm at a loss.

Any help or pointers are greatly appreciated.

Thanks.

1

There are 1 answers

0
Martijn Thé On

It seems like Spotlight does find your files if you place them in ~/Caches/Metadata/$(YOUR_APP_NAME). This is where Safari also puts its bookmark metadata to be indexed by Spotlight.