Pennyworth Posted September 15, 2014 Share Posted September 15, 2014 I know Alfred uses the Spotlight index to power its search results, so my question is: How can I disable Spotlight from indexing the content of package files, particularly iPhoto or iTunes library files? The contents of these packages/libraries are cluttering up my Alfred results like no body's business. It's basically making Alfred dysfunctional for searching files and folders. I'm getting all kinds of irrelevant results with long strings of random characters (because that's how package/library data is named). It's really impacting my experience and I want to fix it ASAP. Thanks community for any advice you have. Screenshots below: Link to comment
Tyler Eich Posted September 16, 2014 Share Posted September 16, 2014 The easiest way to do this is to add the folders in question to Spotlight's Privacy tab. I've answered a question similar to this in the past; it might help you in this scenario too http://www.alfredforum.com/topic/4344-ignore-files-from-application-folders/?p=26218 Link to comment
Pennyworth Posted September 16, 2014 Author Share Posted September 16, 2014 (edited) Tyler, The problem is that by adding certain files to the Spotlight Privacy blacklist, I'm no longer able to search for them! For example, I have two iPhoto libraries on an external hard drive. I also have two on my internal disk. Currently, the contents of the external libraries are indexed by Spotlight (as are the main library files themselves, so I can open them in iPhoto). When I add the two external libraries to the Spotlight Privacy blacklist, their garbled contents no longer clutter my search results. This is great. At the same time, I'm no longer able to quickly access these iPhoto libraries through search results! Confusingly, the iPhoto libraries on my internal drive do not have their package contents clutter up search results, they just appear as opaque files (which is the desired behavior). Something just seems off about all this. Edited September 16, 2014 by Pennyworth Link to comment
Tyler Eich Posted September 16, 2014 Share Posted September 16, 2014 Hmmm… This sounds like a metadata problem. Is your external drive formatted as "Mac OS Extended"? You can find this out by right clicking the drive in Finder, choosing "Get Info", and looking for the "Format" entry. If this isn't the problem, I can't be of much help . Maybe another forum member will have something better to say. Link to comment
Pennyworth Posted September 16, 2014 Author Share Posted September 16, 2014 (edited) Yes, it's Mac OS Extended (Journaled). I'm also running 10.9.4. I should also disclose that I've manually added to Alfred's 'Search Scope' list the folder in which those iPhoto library packages are located. I didn't know of another way to incorporate them into my results. They're on an external drive connected via USB. This must have something to do with it. Edited September 16, 2014 by Pennyworth Link to comment
Pennyworth Posted September 17, 2014 Author Share Posted September 17, 2014 (edited) I can confirm now that something is definitely wrong with how Spotlight/Alfred indexes iPhoto library packages on internal vs. external drives. These library packages are "opaque" on the internal drive. That is to say, you can't see inside them in search results (expected behavior). On my external drive, these packages are transparent, so you can see all their garbled garbage. Also, on the same external volume, I cannot search inside iMovie library packages (expected behavior). So something about iPhoto library packages on an external drive is off. I don't know why this is or how to turn it off but help would be much appreciated. Edited September 17, 2014 by Pennyworth Link to comment
Andrew Posted September 17, 2014 Share Posted September 17, 2014 I can confirm now that something is definitely wrong with how Spotlight/Alfred indexes iPhoto library packages on internal vs. external drives. These library packages are "opaque" on the internal drive. That is to say, you can't see inside them in search results (expected behavior). On my external drive, these packages are transparent, so you can see all their garbled garbage. Also, on the same external volume, I cannot search inside iMovie library packages (expected behavior). So something about iPhoto library packages on an external drive is off. I don't know why this is or how to turn it off but help would be much appreciated. As far as I'm aware, OS X shouldn't be indexing inside this package in this way, regardless of location. Have you tried forcing a full reindex on that drive using the "Rebuild OS X Metadata" shortcut in Alfred's Advanced preferences? (select the option to delete the ./Spotlight-V100 folder too) Cheers, Andrew Link to comment
Pennyworth Posted September 17, 2014 Author Share Posted September 17, 2014 (edited) As far as I'm aware, OS X shouldn't be indexing inside this package in this way, regardless of location. Have you tried forcing a full reindex on that drive using the "Rebuild OS X Metadata" shortcut in Alfred's Advanced preferences? (select the option to delete the ./Spotlight-V100 folder too) Cheers, Andrew I forced a reindex of the drive by adding it to the Spotlight Privacy exclusion list and then removing it -- but it didn't help. (Sidebar: is this different from Alfred's metadata rebuilder?) What finally worked was that I right-clicked the libraries, selected 'Show Package Contents', and manually added the contents to the Privacy exclusion list. This works better than simply adding the library to the exclusion list because I wasn't able to search and access just the library with that workaround, but now I can. For now, problem solved, but I suspect there's some kind of bug with iPhoto library packages. Hopefully Photos.app in Yosemite fixes a lot of these oddities. Edited September 17, 2014 by Pennyworth Link to comment
Andrew Posted September 17, 2014 Share Posted September 17, 2014 I forced a reindex of the drive by adding it to the Spotlight Privacy exclusion list and then removing it -- but it didn't help. (Sidebar: is this different from Alfred's metadata rebuilder?) What finally worked was that I right-clicked the libraries, selected 'Show Package Contents', and manually added the contents to the Privacy exclusion list. This works better than simply adding the library to the exclusion list because I wasn't able to search and access just the library with that workaround, but now I can. For now, problem solved, but I suspect there's some kind of bug with iPhoto library packages. Hopefully Photos.app in Yosemite fixes a lot of these oddities. If you add to spotlight privacy and back out again, this won't fix underlying issues vs deleting the .Spotlight-V100 folder which removes all index data and rebuilds from scratch. Link to comment
Pennyworth Posted September 17, 2014 Author Share Posted September 17, 2014 If you add to spotlight privacy and back out again, this won't fix underlying issues vs deleting the .Spotlight-V100 folder which removes all index data and rebuilds from scratch. I deleted the .Spotlight-V100 folder on the external drive and added/removed the drive from Spotlight Privacy to re-index. It still didn't work. Should I be using Alfred's "Rebuild OS X Metadata"? Is that any different from doing what I did? Link to comment
Vero Posted September 18, 2014 Share Posted September 18, 2014 I deleted the .Spotlight-V100 folder on the external drive and added/removed the drive from Spotlight Privacy to re-index. It still didn't work. Should I be using Alfred's "Rebuild OS X Metadata"? Is that any different from doing what I did? Yes, as Andrew has already explained, you need to rebuild the OS X metadata properly. Go to Alfred's Advanced preferences, click "Rebuild OS X Metadata" and check the box to delete .Spotlight-V100. Link to comment
Pennyworth Posted September 20, 2014 Author Share Posted September 20, 2014 Yes, as Andrew has already explained, you need to rebuild the OS X metadata properly. Go to Alfred's Advanced preferences, click "Rebuild OS X Metadata" and check the box to delete .Spotlight-V100. I did that, and as expected, the .Spotlight-V100 folder on the external drive was not touched by this process. It only indexed the main system drive, which is not where the problem lies. I know this because I enabled hidden files to be shown and watched what happened in the root directories of both drives once I started the rebuild process. My file search results still include the contents of iPhoto Library packages. This isn't a Spotlight issue, this is something else relating to these iPhoto Library packages on the external drive. The current remedy is to manually add the package contents to the Spotlight privacy exclusion list. It's a hack, but it works. Link to comment
Tyler Eich Posted September 21, 2014 Share Posted September 21, 2014 I did that, and as expected, the .Spotlight-V100 folder on the external drive was not touched by this process. It only indexed the main system drive, which is not where the problem lies. I know this because I enabled hidden files to be shown and watched what happened in the root directories of both drives once I started the rebuild process. My file search results still include the contents of iPhoto Library packages. This isn't a Spotlight issue, this is something else relating to these iPhoto Library packages on the external drive. The current remedy is to manually add the package contents to the Spotlight privacy exclusion list. It's a hack, but it works. You might try using a workflow I made to reindex your external drives: Download Open Alfred, type "force reindex ", then choose the drive that's giving you problems. Once you hit enter, AppleScript will ask for your administrator password. It will then execute the following commands (used by Andrew and found originally at SkillZ Design, before Alfred's handy "Rebuild OS X Metadata" button appeared) : sudo rm -R /Volumes/{Drive Name}/.Spotlight-V100 sudo mdutil -i on /Volumes/{Drive Name}/ sudo mdutil -E /Volumes/{Drive Name}/ This will delete the existing metadata index on the drive and force mdutil (Spotlight's backend) to rebuild the metadata. Note that reindexing can take a significant amount of CPU power and several hours. Link to comment
Pennyworth Posted September 22, 2014 Author Share Posted September 22, 2014 You might try using a workflow I made to reindex your external drives Tyler, thanks so much for your help and linking to that workflow. I gave it a shot and it still didn't solve the problem, despite successfully rebuilding the external drive's spotlight index (unlike the Alfred Metadata Rebuild button). That means this is a problem with the specific library packages I'm dealing with. iPhoto's been neglected by Apple for so long that I'm hoping the new Photos.app in Yosemite will fix this. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now