Skip navigation

Lion Mail and Worthless/Failing Searches

29372 Views 83 Replies Latest reply: Jun 28, 2013 10:42 AM by Fritz Lang1 RSS
  • FromOZ Level 2 Level 2 (400 points)
    Currently Being Moderated
    Jul 30, 2011 3:32 AM (in response to John Franks)

    Just to add some further background/scenario.

     

    1. I did not do inline upgrade of Snow Leopard machine I got new Mac with Lion installed.
    2. Did not use Migration Assistant but copied everything over manually (wanted to keep new Lion machine more clean)
    3. Copied over mail folder complete, Lion did some housekeeping and Mail worked fine. Am using new layout.
    4. I have mailboxes that I use to to organise mail by year. So going back to 1999.
    5. I was looking for emails with my Adobe Lightroom serial numbers (I had them filed over multiple (On My Mac) mailboxes. When I did searches for "lightroom" it only found some emails with "light". So I knew it was not working.
    6. Went to System Preferences, Spotlight, Privacy added Macintosh HD, saved, went back and removed it and Spotlight reindexed (magnifying glass had dot in middle). Twenty minutes or so was done.
    7. Now searching works.

     

    One added note about the improved searching in Lion Mail app. When I type "light" Spotlight shows sections in dropdown of: 'Message contains "light"' + People + Subjects + Attachments. When I continue typing to say "lightroom" it narrows down to Message contains "light"' + Subjects. Pretty good.

  • trg2008 Calculating status...
    Currently Being Moderated
    Aug 2, 2011 4:11 PM (in response to FromOZ)

    Also experienced same problem. Indexing now (eta 2 hours...), is this a permanent fix or is it recurring even after reindexing for anyone?

  • Michael Markowitz Calculating status...
    Currently Being Moderated
    Aug 2, 2011 4:22 PM (in response to trg2008)

    My searches only work during indexing.  Problem recurs afterward.

  • da_re Calculating status...
    Currently Being Moderated
    Aug 4, 2011 1:02 AM (in response to xmetal280)

    Same situation for me. My spotlight is not working properly since iv'e upgradet to lion. I've tried all the above mentioned workarounds but no trick helped me resolving the problem.

     

    If I add my harddrive to the privacy area of spotlight in the preferences > close the prefs > reopen the prefs, than the harddrive does not appear anymore...

     

    Sometimes it is even not possible to add the harddrive to spotlights privat section > system is saying failure.

     

    So my basic problem is that spotlight does not even start with the indexing.

     

    Does anyone have a idea how to proceed?

     

    Thx

  • FromOZ Level 2 Level 2 (400 points)
    Currently Being Moderated
    Aug 4, 2011 3:11 AM (in response to da_re)

    Hi there - the best, most precise, thing to do is use the mdutil command. This requires you to run commands in Terminal, and to run them as root.

     

    ** Standard disclaimer **

    Be very careful running commands as root on your Mac (which is essentially a Unix machine) the root user has full access and can do anything on your machine. You can, if you are not careful, and/or don't know what you are doing, damage your machine.

     

    Let me say that again - if you do this below you will run commands on the root (/) folder of your computer. If you do things incorrectly you potentially could wipe/damage the whole Macintosh HDD. That would be worse than a 'bad hair' day. It is completely up to you - no liability accepted (this is all meant to make you be very careful ).

     

    Start a terminal session on your Mac, below you will see various commands, the commands and display in Terminal program are shown as fixed length font, the instructions as this type of font in italics preceeded by a number.

     

    Note:

    • you type the text after the prompt which will be usually the '$'. So if the line below says "iMac:/ $ cd /" you type only "cd /"
    • command line switches like -E ; -i ; -s are CaSe sensitive.

     

    Reference sites:

     

    http://www.thexlab.com/faqs/stopspotlightindex.html

     

    http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ man1/mdutil.1.html

     

    ===============================

     

    1) Go to root of drive

    iMac:/ $ cd /

     

    2) Show which folder you are in

    iMac:/ $ pwd

    /

     

    3) Change to the 'Volumes'  folder

    iMac:/ $ cd Volumes/

     

    4) Check it

    iMac:Volumes $ pwd

    /Volumes

     

    5) List contents of folder - see that Macintosh HD is an alias pointing to '/' the root folder of Mac

    iMac:Volumes $ ls -la

    total 8

    drwxrwxrwt@  3 root  admin   102 Aug  4 07:27 .

    drwxr-xr-x  31 root  wheel  1122 Jul 31 23:54 ..

    lrwxr-xr-x   1 root  admin     1 Aug  4 07:27 Macintosh HD -> /

     

    6) List options for mdutil command. First, being safe, first we will see what is set for drive.

    iMac:Volumes $ mdutil

    Usage: mdutil -pEsa -i (on|off) -d volume ...

              Utility to manage Spotlight indexes.

              -p             Publish metadata.

              -i (on|off)    Turn indexing on or off.

              -d             Disable Spotlight activity for volume (re-enable using -i on).

              -E             Erase and rebuild index.

              -s             Print indexing status.

              -a             Apply command to all volumes.

              -V vol         Apply command to all stores on the specified volume.

              -v             Display verbose information.

    NOTE: Run as owner for network homes, otherwise run as root.

     

    7) Run command as root using the sudo option (special command which runs another command as root)

    iMac:Volumes $ sudo mdutil -s /

     

    WARNING: Improper use of the sudo command could lead to data loss

    or the deletion of important system files. Please double-check your

    typing when using sudo. Type "man sudo" for more information.

     

    To proceed, enter your password, or type Ctrl-C to abort.

     

    Password: [at this point enter your account password]

    /:

              Indexing enabled.

     

    iMac:Volumes $

     

    8) Note re: the above - this will NOT show if specific (sub)folder on drive has had indexing turned off via System Preferences.
    Then IF indexing is turned off (for whole HDD volume) turn it on

    iMac:Volumes $ sudo mdutil -i on /

     

    9) Run command to (totally) erase and rebuild index - obviously only do this if indexing is turned on - to see if this fixes your issue.

    iMac:Volumes $ sudo mdutil -E /

     

    ===============================

     

    Good luck! If the above does not get your machine's Spotlight indexing working properly you may need to take your machine to Apple and/or Apple authorised repair company.

    iMac, Mac OS X (10.7)
  • da_re Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 4, 2011 5:58 AM (in response to FromOZ)

    Thank you FromOZ

     

    I've tried for 2.5 h together with our admin (very skillful in unix) to solve the problem > mission failed.

     

    Once in a while we can force spotlight to start building up an index via the terminal but after some minutes spotlight finishes. It is not clear why and it does, we can't find any reports in the console...

     

    I'm able to add my backup disc to the 'privacy area' of spotlight in the preferences. I'm also able to add my harddisc or the programms-folder, but after closing the preferences and re-opening my harddisc and programm-folder are removed.

     

    Seems to me like a serious problem - hopefully apple will take on this topic an provide a solution or an update. 

  • Lionel3000 Calculating status...
    Currently Being Moderated
    Aug 4, 2011 5:03 PM (in response to da_re)

    I would love to say I have good news but unfortunately not! After spending 3 hours on the phone with apple care trying to fix this on my machine i had to do a full clean install of Lion and now the problem is fixed and searching is fine.

     

    Massive let down on apples part and this is simply not good enough! First real negative experiance with macs and a BIG ONE!!

  • da_re Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 4, 2011 11:07 PM (in response to Lionel3000)

    Hmm - I think I'll wait for the first lion update. Hopefully apple will provide a solution for the problem soon.

  • FromOZ Level 2 Level 2 (400 points)
    Currently Being Moderated
    Aug 5, 2011 4:43 AM (in response to da_re)

    Shame.

     

    Always when upgrading operating systems there is statistically a risk that a certain number of upgrades will not go smoothly. If one looks at the number of people who purchased/upgraded Lion then statistically the failures are low.

     

    But I don't like being a 'statistic' — I always do clean installs for major new releases and then copy over my stuff piece by piece. Never had any issues, and I can also toss old junk which has accumulated on the machine.

     

    I would be encouraging you to do a clean install on new drive and then copy over apps and data.

     

    Anyway good luck!

  • UCF Sam Calculating status...
    Currently Being Moderated
    Aug 6, 2011 11:18 PM (in response to xmetal280)

    Hey Guys,

     

    Had the same problem here... None of the previous solutions in this thread worked for me, but I was able to resolve my issue with "sudo mdutil -i on /Users/", rahter that just "sudo mdutil -i on /" mentioned earlier.  Not sure if this will help anyone else or if my problem was unique, but I figured it was worth mentioning.

     

    -Sam

  • shaunfromludlow Calculating status...
    Currently Being Moderated
    Aug 8, 2011 6:50 PM (in response to xmetal280)

    Both Spotlight and the search in Mail 5.0 were broken for me.  While searching for known material, I would get blank results.

     

    I did a clean install and everything is working perfectly.  FWIW, this is on a 2011 Mac Mini Server.

     

    I tried all of the suggestions recommended on these forums and none of them worked.  The clean install, while timely, did the trick.

  • da_re Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 9, 2011 5:59 AM (in response to xmetal280)

    It is so embarrasing to manually search for a few month old emails in your inbox... unbelievable.

     

    Do someone know when the first lion update is expected? Living without spotlight is close to windows...

  • alt229 Calculating status...
    Currently Being Moderated
    Aug 9, 2011 9:22 PM (in response to UCF Sam)

    I was pulling my hair out with this one until reading UCF's command.  While this exact command didn't work for me it put me on the right track.  I have file vault installed so the command I had to run was as follows:

     

    sudo mdutil -i on /Users/username

     

    After that (and removing and re-adding my mail accounts) they indexed just fine.  Thanks!

    E

  • Satchmo Level 4 Level 4 (1,245 points)
    Currently Being Moderated
    Aug 10, 2011 10:27 AM (in response to xmetal280)

    I created a thread about the search problem after Lion installation before discovering this thread. I'll post the solution to my problem, which may or may not be the same as or solve yours.

     

    Just off the phone after a long stint with Apple support about this.

     

    Spotlight could find the message files (unlocateable by search within Mail). Files that were cached on the POP server (for a month) were searchable, but those stored on the Mac were not.

     

    The tenacioius (A+) Apple support tech traced the problem to the file User > Library > Mail > V2 > MailData > Envelope Index. He had me close Mail, drag Envelope Index to the desktop, and restart Mail, which acted as though it were being opened for the first time. I clicked Continue (I think it said) and Mail restored all of the messages and settings (whew!). When it was done I closed Mail and reopened. Again I had to click through as if it were the first time, and then the messages appeared. It took several minutes for Mail to reindex the messages, which it does independently from Spotlight. It now appears to search properly.

  • da_re Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 11, 2011 3:52 AM (in response to xmetal280)

    @ Satchmo

     

    I've did what you suggested but it did not work out. Everything worked exaktly the way you'd discribed it except of the fact, that afterwards the search is still corrupt. Mail can find people from my adressbook but no subjects or informations from the emails itselfe. Obviously mail needs spotlight for that, what sill is not working for me...

1 2 3 4 ... 6 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (7)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.