Multiple Spotlight indexers for the same file types?

I'd like to add additional metadata regarding image files to Spotlight's index, so that I can see the data in Get Info in Finder. I don't want to replace Apple's image indexer; I just want to add one more field.

I am able to successfully create a new Spotlight indexer for a custom file type, and it works; in particular, I can see the new metadata in the Get Info window for the file in Finder.

When I modify the indexer to also accept jpeg files, I'm seeing that Spotlight is choosing to use macOS' built-in image indexer all the time, and never my custom indexer. (I'm using mdimport -d2 -t sample.jpeg for testing)

Before I start asking about code-level questions, it seems prudent to start with the basics:

  1. Is Spotlight willing to leverage multiple indexers for the same file type?
  2. Does mdimport -d2 -t sample.jpeg only test one single indexer? If not, what is the correct way to test an indexer that accepts file types already accepted by an Apple indexer?

Is Spotlight willing to leverage multiple indexers for the same file type?

No.

You’re not the first person to ask about this. I’m almost certain we have an ER in place requesting such support, but I can’t find it in my records. You should feel free to file your own. Having said that, the fact that this architecture has stood since Spotlight was first introduced in macOS 10.4 (not 10.14, but 10.4, from 2005!) means I’m not optimistic.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Multiple Spotlight indexers for the same file types?
 
 
Q