Outlook 16.23.1 not searching correctly on Mojave 10.14.4

Anonymous
2019-04-04T21:28:30+00:00

I've had intermittent problems where the search function in Outlook on my Mac would stop working. In the past, I had a reliable fix that I found somewhere online; I ran the following in Terminal:

mdimport -g ‘/Applications/Microsoft Outlook.app/Contents/Library/Spotlight/Microsoft Outlook Spotlight Importer.mdimporter’ -d1 ‘/Users/USERNAME/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile’

... where USERNAME was the home directory name on my Mac. This took a while to run, but worked like a charm every time.

But I recently upgraded to Mac OS 10.14.4 (Mojave), and apparently this command is no longer supported in Terminal. Now when I try to run it, I get the error:

'-g' no longer supported. Importers may only be tested by installing them.

To be honest, I don't really know what the "-g" parameter means. Any ideas on how to resolve? I'm a bit out of my depth here and don't want to do something that makes things worse.

Outlook | MacOS | Legacy Outlook for Mac | For home

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

51 answers

Sort by: Most helpful
  1. Anonymous
    2020-02-17T19:02:39+00:00

    This is how I fixed this annoying issue for my env:

    • Outlook 16.34
    • Catalina 10.15.3

    mdimport -i ~/Library/Group\ Containers/UBF8T346G9.Office/Outlook/Outlook\ 15\Profiles/Main\ Profile/Data/Tasks/

    find ~/Library/Group\ Containers/UBF8T346G9.Office/Outlook/Outlook\ 15\Profiles/Main\ Profile/Data/Messages/ -type f -mtime -2 -exec mdimport -i "{}" ;

    I wish you the best.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-06-14T15:09:33+00:00

    yobelow's solution looks interesting, I may try that next time to see what just sudo mdutil -E /does

    Before Mojave, I used to use the solution described here "Outlook for Mac search returns "No Results," and task items are not displayed"

    I am running macOS Mojave version 10.14.5

    of course what the OP and most of us here used to do if the re-indexing failed was go to terminal and run a command such as this...

    mdimport -g "/Applications/Microsoft Outlook.app/Contents/Library/Spotlight/Microsoft Outlook Spotlight Importer.mdimporter" -d1 "/Users/<user_name>/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/<my_profile_name>"

    but the option -g, as far as I can tell, was to specify a path and use Microsoft's custom spotlight importer ( the notes say "-g" is the default path of the Outlook installation) and the old mdimport man page says, (-g plugin  Import files using the listed plugin, rather than the system installed plugins. )which is not supported in Mojave. I admit here my understanding is really fuzzy so I am sure someone else could point me to a man page.

    I ran the steps he re-posts that have been the steps to "re-index"

    REINDEXING STEPS

    1. Choose Apple menu > System Preferences, then click Spotlight.
    2. Click the Privacy tab.
    3. In Finder:

    a. On the Go menu click Go to Folder...

    b. Copy and paste the following location into the "Go to the folder:" dialog box and click Go:

    ~/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/

    1. Drag the ‘Main Profile’ folder to the Privacy tab. Once added, remove the folder, and Spotlight will re-index the folder. Note: You must perform this step for any additional profile folders you may have. The status of the re-indexing is not shown anywhere. so you need to wait for some time and check the result.

    However these steps only work if your existing System Spotlight Index isn't corrupt.

    In my case, this didn't work the first time around. The solution was to do a system-wide re-index of the Spotlight database.  Some googling turned up a response by "Tim Hardwick" of macrumors and commenter "macdaddy44" say that can be accomplished do the following (I have not tested this)

    **Version 1 (minimal)**Type command

    "sudo rm -R /.Spotlight-V100"

    Then type the command (-i (on|off) Turn indexing on or off)

    "sudo mdutil -i on /"

    Then type the command (-E Erase and rebuild index.)

    "sudo mdutil -E /" 

    Version 2 (more exhaustive)

    Type the commands...

    "mdutil -i off /"

    "sudo rm -rf /.Spotlight-V100"

    "sudo rm -rf /.Spotlight-V200"

    "mdutil -i on /"

    "mdutil -E /"

    What I did is Version 3...

    Version 3 (Using a third-party utility)

    This appears to also do what the above, but because I didn't check the files it is modifying, so it's a mystery of the black box of 3rd party software because I used a utility to do it. I did this using Titanium Software's free Onyx utility, which is available for all recent versions of macOS (use the version for your OS).

    I wasn't sure what was too much to select so I unchecked everything and only selected "Spotlight index" and "Mail's mailboxes" and radio button for "Delete the existing index"

    After I did that, it still wasn't fixed I had to re-apply the REINDEXING STEPS listed above to get repair the Outlook 2016 files.

    There are other problems that exist and there may be options to do this all from the command line rather than hokey pokey going to through the gui. It appears that duplicate installs of Outlook spotlight instances can also be a source of problems and Spotlight can get stuck on certain folders (which I think is part of why we re-index those folders using the gui but I think this is also possible from the commandline I'm still working that out.)

    List existing importers and check for duplicates

    /usr/bin/mdimport -L

    Ok, I'll stop editing this post.

    References

    [1] How to get Outlook email indexed by Spotlight after reinstalling Office 2011? - Ask Different

    [2] Reindex Spotlight from the Command Line in Mac OS X

    [3] Outlook for Mac search returns “No Results,” and task items are not displayed

    [4] Titanium Software | Operating system utilities for Mac - OnyX

    [5] Outlook 16.23.1 not searching correctly on Mojave 10.14.4 - Microsoft Community

    [6] How to Rebuild the Spotlight Index on Your Mac - MacRumors

    [7] How To Fix Spotlight Forever Indexing issue on Mac OS X | Technobezz

    [8] Outlook 2016 for mac search is not working. Have tried reindexing - Microsoft Community

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2019-04-15T16:40:43+00:00

    This same problem happened to me periodically with a range of different Outlook builds and MacOS versions. I could never definitively nail down why it happened, but my suspicion was that it happened when Outlook wasn't closed gracefully.

    The solution was always to run the following in Terminal:

    mdimport -g ‘/Applications/Microsoft Outlook.app/Contents/Library/Spotlight/Microsoft Outlook Spotlight Importer.mdimporter’ -d1 ‘/Users/USERNAME/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile’

    ... where USERNAME was the home directory name on my Mac. This took a while to run, but always resolved the issue. 

    But mdimport -g is not supported under MacOS 10.14.4 (Mojave), so I no longer have a fix. I'd recommend to everyone not to upgrade to Mojave until a fix is available. When using earlier MacOS versions, the problem is fixable using the above-mentioned process. I cannot say definitively which versions of Outlook it worked with, but it worked with every version I ever tried it with.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2019-04-06T20:17:27+00:00

    Huni - the article you posted above says Microsoft has been aware of this problem since Nov 2018. That’s 5 months ago and still no fix? Search is a critical function in Mail. How can it be unresolved after 5 months?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2019-04-05T01:22:57+00:00

    Huni - I downloaded and ran the Outlook Search Repair tool you provided a link for above. When it opens, there's just a blank window, with no menu options available to do anything. Is this what's supposed to happen?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments