7 Replies Latest reply: May 1, 2013 4:01 PM by Linc Davis
spamallyouwant Level 1 Level 1 (0 points)

One of my disks does not get indexed properly by Spotlight.  It is a single partition, HFS+ encrypted, but that doesn't stop Spotlight from indexing my other disks so I don't see why it should affect it.  I have tried disabling indexing, deleting the index files and re-enabling indexing.  Spotlight then spends about 30 seconds re-indexing, but it ought to spend a lot longer, and afterwards it is still not able to locate any of the files on the disk.


Mac Pro, OS X Mountain Lion (10.8.3)
  • 1. Re: Why does Spotlight not index my disk?
    Linc Davis Level 10 Level 10 (117,930 points)

    Back up all data.

     

    Triple-click anywhere in the line below to select it:

     

    mdutil -as

     

    Copy the selected text to the Clipboard (command-C).

     

    Launch the 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. Click Utilities, then Terminal in the icon grid.

     

    Paste into the Terminal window (command-V).

     

    The output of the command will show whether indexing (Spotlight) is enable for each mounted volume. Is it enabled for the volume in question?

  • 2. Re: Why does Spotlight not index my disk?
    spamallyouwant Level 1 Level 1 (0 points)

    Yes indexing is enabled.  As I already said, it begins indexing, and generates some files in .Spotlight-V100 but it stops after 30 seconds so it's obviously not complete.

  • 3. Re: Why does Spotlight not index my disk?
    Linc Davis Level 10 Level 10 (117,930 points)

    If you have more than one user account, these instructions must be carried out as an administrator.

     

    Launch the Console 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. Click Utilities, then Console in the icon grid.

     

    Step 1

     

    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select

    View Show Log List

    from the menu bar.

     

    Enter "mdworker" (without the quotes) in the Filter text field. Select the most recent 50 or so messages that appear in the Console window. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).

     

    If there are long runs of repeated messages, post only one example of each. Don't post many repetitions of the same message.

     

    When posting a log extract, be selective. Don't post more than is requested.

    Please do not indiscriminately dump thousands of lines from the log into this discussion.

     

    Some personal information, such as the names of your files, may be included — anonymize before posting.

     

    Step 2

     

    Do the same with the search string "mds".

  • 4. Re: Why does Spotlight not index my disk?
    spamallyouwant Level 1 Level 1 (0 points)

    Spotlight doesn't log its errors into 'all messages', it logs them into 'system.log'.  There are a few errors, which I will paste below, but none of them correspond to the volume that has the problem.  The files on / are indexed correctly.

     

    mds: (/)(Warning) IndexQuery in bool preIterate_FSI(SISearchCtx_FSI *):Throttling inefficient file system query

     

    mds: (/.Spotlight-V100/Store-V2/BA243D46-9421-2151-AD8F-AB7F6F887341)(Error) IndexStore in bool setLocalizedAttributesLocked(datastore_info *, db_obj **, CFStringRef *, CFDictionaryRef *, CFIndex, StoreOptions, CFDictionaryRef, bool, bool, CFArrayRef):Error:7 setting field:com_apple_system_prefs_keywords for oid:295331

     

    sandboxd: mdworker deny file-read-xattr /Users/foo/Library/Caches/Firefox/Profiles/phdaez2i.default/safebrowsing-to_del ete (pre-plugin fstype:hfs fsflag:4809000 flags:250000004C diag:0 uti:public.folder plugin:internalPlainTextImporter - find suspect file using: sudo mdutil -t 213321)

  • 5. Re: Why does Spotlight not index my disk?
    Linc Davis Level 10 Level 10 (117,930 points)

    Please enter the following command in the Terminal window in the same way as before (no typing) and post the output:

     

    find /V*/* -type f -name .dontIndex

  • 6. Re: Why does Spotlight not index my disk?
    spamallyouwant Level 1 Level 1 (0 points)

    It doesn't find any dontIndex files.

  • 7. Re: Why does Spotlight not index my disk?
    Linc Davis Level 10 Level 10 (117,930 points)

    Back up the volume, erase, and restore.