How to Prevent Spotlight from Indexing Non-Apps in /Applications Directory?

3

0

The only thing I need indexed in the /Applications folder are the .app files.

Is there any way to setup a filter to have mds or Spotlight ignore everything in /Applications except .apps?

Otherwise, would it be possible to setup a rule for Alfred to omit any non-.app records from /Applications? I still want documents indexed and returned, just not from that specific directory.

OS X 10.6.8 if you're wondering.

Igorio

Posted 2011-11-28T17:51:34.257

Reputation: 688

2Why do you have non-apps in /Applications? – Daniel Beck – 2011-11-28T18:46:37.037

Many apps choose to store files in /Applications. For instance Microsoft Office comes with an "Office" folder with a variety of non .app files. – Igorio – 2011-12-05T16:54:35.453

Answers

2

From the Applications features:

Spotlight Comments can also be used to ignore apps: Add "alfred:ignore" to the Spotlight Comment and Alfred will ignore the application or file.

enter image description here

So, you could at least tell it to ignore a set of documents you know before. However, I don't think going the other way round is possible at the moment (i.e. setting up a rule like "Don't index non-.app files").

slhck

Posted 2011-11-28T17:51:34.257

Reputation: 182 472

Please correct me if I'm wrong there, can't try everything out. – slhck – 2011-11-28T18:01:04.857

you may want to pear down your suggestions to one, the only real option i see is having a script tag all non-.app files in /Applications with alfred:ignore – Igorio – 2011-11-28T18:24:35.657

Well, as far as I understand it, Alfred does not index what Spotlight can't index, so here you have a few ways to achieve that. – slhck – 2011-11-28T18:53:29.777

Modifiying the spotlight settings files does not achieve this, moving the files and symlinking them is outside the constraints of the question, and the .noindex idea simply does not apply. If you cut out the incorrect info and condense it into one concise and correct answer, I will mark it as the correct answer. – Igorio – 2011-12-05T17:06:59.063

Done so. Sorry, was just trying to offer a few ideas that go beyond your use case. – slhck – 2011-12-12T23:29:05.880