Quick and dirty guide to troubleshooting Spotlight with Entourage

The Entourage Help site is currently offline. As a temporary solution (until the site is back online), I decided to post this here:

With the Office 11.2.3 update, Entourage is now offers Spotlight integration in Mac OS X 10.4.3 and up, allowing us to search for messages, contacts, appointments, etc.. For some users, Spotlight searches did not seem to work straight out of the box. Here are a few tips and trick allowing you to find out where the problem is (and hopefully fix it).

  • Make sure the system is up to date.
  • Make sure Spotlight is set to index e-mails, contacts, calendar events… in the System Preferences (Spotlight Prefpane).
  • Enable Spotlight integration in the Entourage preferences
  • Check that ~/Library/Caches/Metadata/Microsoft/Entourage/2004 is not in the “no index” list in the Spotlight PrefPane (replace 2004 by 2008 for Office 2008).
  • Wait for Spotlight indexing (this can take time)

In order to integrate all its data in the Spotlight searches, Entourage creates cache files in a special format allowing Spotlight to identify and index them. Once Spotlight integration is activated in the preferences, you can double check in your system that the corresponding files are indeed being properly generated. Check in ~/Library/Caches/Metadata/Microsoft/Entourage (~/ represents your User folder). You should see folders and subfolders with names looking like “1.vRgeContact”. If you have these files, Entourage did its part of the deal.

Sometimes, even once Entourage has generated the indexing files and you have waited for what seems to be ages, none of your Entourage items show up in the Spotlight searches. Here are a few commands to be performed in the Terminal to find out what’s going on.

  • mdimport -L This command will list all the mdimporter your System detects on your Mac. These files allow Spotlight to index different file formats. The result should list /Library/Spotlight/Microsoft Entourage.mdimporterIf it doesn’t, then a bug in the System prevents it from using the Entourage mdimporter located in /Library/SpotlightMost of the time in this case, none of the mdimporter in this folder are being picked up by the System (it’s definitively a bug – it also means that the other mdimporters for other file types in this folder are not being used either). One workaround is to copy the “Microsoft Entourage.mdimporter” in the proper location in your user folder: ~/Library/Spotlight (create the folder if it doesn’t already exist). You will have to do the same thing for all users on your Mac. You will also have to be careful if a new Office update comes out since the updater will probably not look for files to update in this folder. Hopefully, future System updates will correct this problem. Running mdimport -L again should now list the Entourage mdimporter in the new location (wait a little while before you run it to really make sure the System has time to pick it up). There are other “proper” locations to place these importers. You could move it to /System/Library/Spotlight for instance, but I strongly advice against placing *anything* in the /System folder.
  • If the previous command properly lists the Entourage mdimporter but you still get nothing in your Spotlight searches, you can manually trigger the indexing. For Office 2004, use mdimport ~/Library/Caches/Metadata/Microsoft/Entourage/2004 to trigger the indexing of the Entourage data (replace 2004 by 2008 for Office 2008 obviously). If you are really desperate, you can even force the indexing using mdimport -f ~/Library/Caches/Metadata/Microsoft/Entourage/2004 (again, replace 2004 by 2008 for Office 2008) but there are very few circumstances where it should make any difference.
  • If this still does not work, there might be a corruption in your Spotlight Indexes. When everything else failed, you can nuke the index and force Soptlight to completely re-index your drives. This will take hours….. First, make sure the drive you want to index is indeed “on” for indexing (don’t trust the Spotlight PrefPane for that: it is notoriously buggy). sudo mdutil -i on / (you will have to authenticate) will turn it on. If you have more than one drive, you can turn it on (or off) for the other drives by simply replacing / by the path to the other drives (another tip: you can use drag and drop in the windows of the Terminal to take advantage of the auto-completion of the path. Dragging a drive to the window enters the proper path to this drive automatically). Then you can nuke all previous indexes: sudo mdutil -E / (again, you will have to authenticate and again you can use the same command for other drives by replacing / by the path to your other drives). Complete re-indexing should start immediately.