2

When I search for an app by name, Spotlight usually finds that app before it makes other suggestions. But when I was first setting up this new laptop, I mistakenly chose the web-search item for "iterm" (I use iTerm2 for my terminal), and so now every time I use Spotlight to open iTerm, it places the web search suggestion above the installed app.

This only happens for iTerm. If I search for the name of my graphics program, that app is the first suggestion, and the web search item appears below it. The same goes for my audio player, my browser, games, calculator, calendar, etc. But with iTerm, it's like I've ironed a wrinkle into the dress shirt and there's no way to smooth it out and iron it flat again. Now it has a permanent wrinkle that's as sharp and crisp as the crease in military slacks.

I take this as proof that Spotlight has two data sources: (1) an index of disk contents, and (2) a remembered history of which results I tend to choose for particular search strings. All the "reset Spotlight" questions I've found on this site are concerned with resetting the disk index, and the remedies I've tried have had no impact on the bad ranking.

I've disabled all Spotlight suggestions except Apps, Calculator, Conversions, and System Preferences. I've used mdutils from the CLI to nuke the Spotlight index. I've added my entire drive to the Privacy list and then removed it. I've tried repeatedly search for "iterm" and then carefully selecting the application, hoping to teach it to rank the app higher, and by now I'm quite sure that I've picked the app a hundred more times than the web search. I only wrongly picked the web search once. IT WAS ONE TIME.

The other factor that contributes to this problem is that MacOS has no way to remove search-the-web from the list of suggestions. Even if a person disables suggestions from the web (i.e. actual web search results), the OS still inserts into the Spotlight suggestions an offer to perform a web search for the Spotlight search string. If that could be removed, this problem would presumably go away, but lots of research suggests that the OS doesn't let us turn that off and never will.

How can I reset my Spotlight "usage data" to make it forget all my previous searches and which suggestions I selected each time?

1
  • In case of iTerm2 IMHO it's much simpler to open it using hotkey instead of Spotlight. Commented Aug 7, 2022 at 6:01

1 Answer 1

3

The "Spotlight usage data", as you call it is kept in the following file...

~/Library/Application Support/com.apple.spotlight/com.apple.spotlight.Shortcuts.v3

Remove it and log out and back in (before making another search) and check if that solves your issue.

Depending on the operating system in use, the file could also be here in older ones:
~/Library/Application Support/com.apple.spotlight.Shortcuts

1
  • 1
    In the end I needed to also delete the disk index, via sudo mdutil -E /, but this worked brilliantly. And I didn't delete the whole file: it's a regular plist, so I simply removed the entries I don't like. Thanks so much!!
    – Tom
    Commented Aug 9, 2022 at 3:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .