mdimporter not re-indexing existing files

Mikuro

Crotchety UI Nitpicker
I've written a custom mdimporter to make Spotlight index text clippings. It works fine for new clippings, but I can't figure out how to get OS X to re-index existing clippings in bulk.

I can re-index individual files by explicitly passing them to mdimport, but obviously that's not a complete solution.

I've tried "mdimport -r path/to/my/mdimporter", but this has no effect whatsoever. I've rebooted as well. No dice.

I also tried changing the "UTExportedTypeDeclarations" tag in my plugin's info.plist file to "UTImportedTypeDeclarations", which is what Apple says I should use for standalone mdimporters (as opposed to those embedded in an application, made to index that app's custom file types). Same results.

I wonder which type declaration I should use, though. On the one hand, it is a standalone importer, so Imported seems to be in keeping with Apple's docs. On the other hand, I'm forced to define a custom UTI, since OS X does not give textClippings their own UTI by itself, so Exported seems appropriate. Perhaps neither fits perfectly and this is where the problem lies? If so, any idea how I should fix it?
 
Back
Top