Spotlight issues in Outlook 2011 (searches and smart folders)

This is basically a repost from my other post about troubleshooting Spotlight issues in Outlook 2016 edited specifically for Outlook 2011.
Outlook 2011 is only 32 bit and you can therefore only use mdworker32. It also stores its files in a different location than Outlook 2016.

Most of the time, you can correct the indexing issue by simply adding the ~/Documents/Microsoft User Data/Office 2011 Identities folder to the Spotlight Exclude list in the Spotlight System Preferences, then a few minutes later, remove it from the list. This will trigger a proper reindexing of the folder.

Sometimes, unfortunately, that’s not enough. That can happen when Spotlight crashes while indexing your Mac, or with weird Spotlight mdimporter conflicts.

You can figure out whether Spotlight crashes by looking for md-related (e.g.: mdworker) crash logs in either /Library/Logs/DiagnosticReports or ~/Library/Logs/DiagnosticReports

For conflicts, etc. you can use the command mdimport -L to list all mdimporters. Sometimes, you’ll see paths for apps that are no longer on your Mac, or apps that are in the trash, etc.

You can also manually reindex the Outlook identity through the terminal using:
mdimport32 -g /Applications/Microsoft\ Office\ 2011/Microsoft\ Outlook.app/Contents/Library/Spotlight/Microsoft\ Outlook.mdimporter ~/Documents/Microsoft\ User\ Data/Office\ 2011\ Identities

Using this command, you have several advantages:

  • You only use the mdimporter provided by Outlook so you avoid potential issues with other mdimporters
  • You get warnings for any problem that might come up
  • When the Terminal goes back to the command prompt, you know it’s done 🙂