Mail search in Lion not working

Discussion in 'Mac OS X Lion (10.7)' started by Samuel Gordon, Aug 14, 2011.

  1. Samuel Gordon macrumors member

    Joined:
    Aug 29, 2008
    Location:
    Czech Republic
    #1
    Search in Mail.app doesn't work (it doesn't find anything), although I CAN find all mails through Spotlight. It didn't work 2 days ago and I was advised to rebuild the Spotlight index. It was a success and I thought that was the problem but it's broken again in Mail :(
     
  2. phpmaven macrumors 68040

    phpmaven

    Joined:
    Jun 12, 2009
    Location:
    San Clemente, CA USA
    #2
    In Mail, do a Mailbox>Rebuild (from the menu) and see if that fixes it. If that doesn't work, call Apple, their support is great.
     
  3. Samuel Gordon thread starter macrumors member

    Joined:
    Aug 29, 2008
    Location:
    Czech Republic
    #3
    Unfortunately, it didn't help :( And as for Apple support - I believe it's great in the USA but in the Czech Republic, there's only a support in English.
     
  4. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #4
    Try this:

    Quit the Mail app and go to this directory:

    ~/Library/Mail/V2/MailData/

    Delete these files:

    Envelope Index
    Envelope Index-shm
    Envelope Index-wal

    Restart the Mail app. Don't freak out when you get the "Mail Message Import" dialog. Just hit "Continue".

    Do your searches work now?

    S-
     
  5. Garrod macrumors regular

    Garrod

    Joined:
    Nov 13, 2008
    Location:
    UK
    #5
    I had this earlier this morning. I just used Disk Utility and repaired the permissions on my main hard disk. That seemed to fix it a treat.
     
  6. Samuel Gordon thread starter macrumors member

    Joined:
    Aug 29, 2008
    Location:
    Czech Republic
    #6
    sidewinder: No, it doesn't work. I think it does the same functionality as 'Rebuild'.

    Garrod: Doesn't work either. To be honest, repairing disk permissions never worked for me as a solution :(

    I really don't know, it's weird... I think you can't be of more help because I tried just everything.
     
  7. laucutus macrumors newbie

    Joined:
    Aug 19, 2011
    Location:
    Eugene, OR
    #7
    Quote:
    Quit the Mail app and go to this directory:

    ~/Library/Mail/V2/MailData/

    Delete these files:

    Envelope Index
    Envelope Index-shm
    Envelope Index-wal

    Restart the Mail app.



    Sidewinder:
    Thanks for the info; this worked for me, whereas rebuilding the mailboxes & turning on indexing on & on & on again didn't work.
    I want to add that the ~/Library/Mail folder is hidden, and it took me a little while to realize that.
    Thanks again,
    Sam
     
  8. ralphyy macrumors newbie

    Joined:
    Mar 4, 2012
    #8

    Thanks for this.

    The basic rebuild did nothing for me. But this delete files and rebuild did the trick.

    (Why is buying a new computer such a pain in the a**?)

    Thanks again.
     
  9. Nord macrumors member

    Nord

    Joined:
    Apr 28, 2010
    #9
    Hi there people.

    I have the same problem as Samuel, Mail search in Lion is inexistent. It finds nothing. Not even in Spotlight in my case. I've tried rebuild the Mail, to re-index spotlight, repair permissions, nothing. On iCloud.com directly, search takes minutes to find anything, while it took only a split second before; it's a pain.

    I'll try to flush the files described to sidewinder and I'll come back to keep you in touch., but I think iCloud has to do something about it as well.
     
  10. Nord macrumors member

    Nord

    Joined:
    Apr 28, 2010
    #10
    Unfortunately, it didn't work either. I even tried to un-checkbox and re-chebox the Mail in iCloud system preferences in vain. I'm out of ideas. I'm simply unable to search for anything in Mail and I have >8000 E-mails across 3 years, some are very important and I have to search them manually or flag them... Since I'm always on the move, Export is no option and it shouldn't be by an IMAP Mail.

    It worked on Snow Leopard, Could iCloud and/or Lion be the problem ? Also, I find Spotlight to be very slow in comparison to Snow Leopard's. Spotlight could be the problem according to this blog:

    http://blog.campodoro.org/?p=154

    I'm trying this solution as a last option, but it's simply reindexing using the terminal, I've already done this with Onyx, so I doubt this will work.
     
  11. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #11
    Nord,

    Just do what the article says. Nothing it has you do is destructive. It wouldn't hurt to erase and rebuilt the index using this command:

    sudo mdutil -E /

    I always have the Mail.app keep messages and attachments local. Disk space is cheap and I like fast access.

    S-
     
  12. Nord macrumors member

    Nord

    Joined:
    Apr 28, 2010
    #12
    Thanks for the support sidewinder.

    Strangely, this last command did work for me, where all other failed !
    I have mail search back as it was.

    You should try it Samuel !

    Thanks. :)
     
  13. harryal macrumors newbie

    Joined:
    Apr 3, 2012
    #13
    Odd result with 'All' selected in Lion Mail search

    Has anyone else had this one with Lion Mail search? It's missing one rather large mailbox when set to search 'All' mailboxes. Search of just that mailbox works fine. I get the same effect using a Smart Mailbox.

    As we're just moving from Snow Leopard to Lion, with one installation of each just now, we can see that the SN Mail search of All mailboxes IS finding said mailbox - indeed this thing started because we noticed SN search was showing duplicate messages (but those duplicate pairs don't show up in Lion searches of 'All'). [The local mailboxes of both computers are identical, ultimately from a transfer of the same Entourage database contents into both copies of Mail.]

    A rebuild of the 'missed' mailbox had no effect on this problem.
     
  14. ArizonaLoco macrumors newbie

    ArizonaLoco

    Joined:
    Sep 16, 2011
    Location:
    Phoenix, AZ U.S.A.
    #14
    Mail search in Lion not working

    I tried this on my Lion 10.7.4 clean install and it didn't work for me. I'm going to try deleting the index and see if the rebuild helps.
     
  15. ArizonaLoco macrumors newbie

    ArizonaLoco

    Joined:
    Sep 16, 2011
    Location:
    Phoenix, AZ U.S.A.
    #15
    Unfortunately this also didn't work for me. Now I'm stumped. Looks like an all out web search is on for me.
     
  16. McRCN macrumors regular

    Joined:
    Nov 19, 2010
    Location:
    Virginia
    #16
    I had the same problem this morning and your advice fixed the problem.
     
  17. pizzafootbal macrumors member

    Joined:
    Jul 24, 2010
    #17
    Maybe you aren't searching correctly. If you are trying to search for someone who sent you something, make sure "from" is selected
     
  18. kell1831 macrumors newbie

    Joined:
    Mar 12, 2012
    #18
    Great - this works!

    Thanks! This worked perfectly for me.
     
  19. rhawk301 macrumors newbie

    Joined:
    Jul 31, 2012
    #19
    worked for me! yeah!
     
  20. pantaa.rheii macrumors newbie

    Joined:
    Nov 14, 2012
    #20
    Hi,

    I have a similar problem:

    When searching for an email Mail will only search in the main mailboxes, not in any of the sub-mailboxes. I have three different email accounts (e.g. 'Account 1', 'Gmail', 'Account 3') and various mailboxes underneath each of them (e.g. '1 Actions pending', '2 Waiting for'). I have attached a screenshot.

    I've tried the suggested solutions:
    1) The rebuild function
    2) Deleting the envelope files
    3) Turning spotlight indexing on.
    Nothing has changed.

    Again, the search is working, but it doesn't include all my sub-mailboxes.

    I would really appreciate any advice on this!
    Thank you!
     

    Attached Files:

  21. dramaticaudio macrumors newbie

    Joined:
    Jul 22, 2011
    #21
    Just wanted to thank you guys for your information. Was having this problem, so I googled it and found the answer right here! :)
     
  22. skafia macrumors 6502

    skafia

    Joined:
    Apr 4, 2010
    Location:
    SOCAL
    #22
    I've been having a similar issue and I accidentally added my main hard drive to the "do not search" list in Spotlight. Removing the hard drive and I'm able to search from mail again in Spotlight AND in the mail app.
     

Share This Page