HT201716: Rebuild the Spotlight index on your Mac

Learn about Rebuild the Spotlight index on your Mac
Brian Drachman

Q: Spotlight search problem

I just purchased a new iMac 27 inch and migrated my data from my old iMac.  I created a new user account on the new mac to store all of the files, since the old user account on the old mac had been upgraded over multiple operating systems.

 

Since being on the new mac, spotlight doesn't work properly.  It cannot find many of my document files anymore.  I have rebuilt the index several times with no success.

 

One weird thing I have noticed is that DURING the time the index is building, I can use spotlight to find files by name, although it is somewhat slow.  However, once the index is complete, it can no longer find these files.  I guess that this suggests that the index is not including many of the files.

 

thoughts?

Posted on Nov 19, 2015 7:59 PM

Close

Q: Spotlight search problem

  • All replies
  • Helpful answers

  • by Linc Davis,

    Linc Davis Linc Davis Nov 19, 2015 8:16 PM in response to Brian Drachman
    Level 10 (207,920 points)
    Applications
    Nov 19, 2015 8:16 PM in response to Brian Drachman

    This is a diagnostic procedure. It makes no changes and therefore will not, in itself, solve the problem.

    Step 1

    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.

    Please triple-click anywhere in the line below on this page to select it:

    syslog -F \$Message -k Sender mdworker -o -k Message Rne Norm -k Sender mds -o -k Sender sandboxd -k Message Seq mdutil | tail -100 | sort | uniq | tail -50 | pbcopy

    Copy the selected text to the Clipboard by pressing the key combination command-C.

    Launch the built-in Terminal application in any of the following ways:

    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

    ☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.

    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign ($) to appear.

    The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message. 

    The Terminal window doesn't show the output. Please don't copy anything from there.

    If any personal information appears in the output, anonymize before posting, but don’t remove the context.

    Step 2

    Enter the following command as in Step 1 and post the output:

    mdutil -as 2>&- | pbcopy

    You can then quit Terminal.

    Step 3

    Launch the Console application in the same way you launched Terminal. In the Console window, look under the heading DIAGNOSTIC AND USAGE INFORMATION on the left for crash reports related to Spotlight. If you don't see that heading, select

              View Show Log List

    from the menu bar. A Spotlight crash report has a name beginning in "mds," "mdworker," or "mdwrite," and ending in ".crash". Select the most recent such report, if any, from the System and User subcategories and post the entire contents—the text, please, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)

    Please don’t post any other kind of diagnostic report, such as hang logs—they're very long and not helpful.

    When you post the results, you might see an error message on the web page: "You have included content in your post that is not permitted," or "The message contains invalid characters." That's a bug in the forum software. Please post the text on Pastebin, then post a link here to the page you created.

    If you have an account on Pastebin, please don't select Private from the Paste Exposure menu on the page, because then no one but you will be able to see it.