Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

stevemiller

macrumors 68020
Original poster
Oct 27, 2008
2,110
1,697
i just tried to search my inbox for mail from a particular contact. it detected and auto completed the contacts name correctly in the search field, but the search results were completely wrong. The contact's last name is "Larkin", and it was instead giving me results from "linkedin".

the worst part is that i can clearly see messages from him in my inbox, and i can even search them by either his first or last name, but if i put both (spelled correctly, i triple checked!) it fails.

whats the deal? anyone know?
 
Mail uses the Spotlight index for those searches, and it is possible the index is corrupted. Try running the command below in Terminal to reindex. Give it some time as can take a while.

Code:
sudo mdutil -E /

Another thing to try is to rebuild that mailbox. Click on Inbox then in the Mailbox menu click Rebuild.
 
i just tried to search my inbox for mail from a particular contact. it detected and auto completed the contacts name correctly in the search field, but the search results were completely wrong. The contact's last name is "Larkin", and it was instead giving me results from "linkedin".

the worst part is that i can clearly see messages from him in my inbox, and i can even search them by either his first or last name, but if i put both (spelled correctly, i triple checked!) it fails.

whats the deal? anyone know?

Is it possible that those linkedin emails had the name in the text? Pretty sure Mail searches the contents of mail by default not just the sender.
 
thanks for the suggestions guys. i tested the same search again today and got correct results. i didn't rebuild any spotlight indexes, but i wonder if it just re-indexed of its own accord at some point. i did restart mail when the problem first occurred and that didn't fix it, so i know the solution wasn't the old "did you try turning it off and back on again?"

its still a little troubling that mail can be expected to sometimes return incorrect results for straightfoward searches, though.
 
Mail uses the Spotlight index for those searches, and it is possible the index is corrupted. Try running the command below in Terminal to reindex. Give it some time as can take a while.

Code:
sudo mdutil -E /

Another thing to try is to rebuild that mailbox. Click on Inbox then in the Mailbox menu click Rebuild.

how do you disable index? :apple:
 
Do you mean turn off Spotlight indexing altogether? If so, you can enter the below command in Terminal to turn it off systemwide. Not sure why you would want to do this though?

Code:
sudo mdutil -a -i off

Well I was not sure if indexing would slow Mac down? Like Windows PC. :apple:
 
Well I was not sure if indexing would slow Mac down? Like Windows PC. :apple:

No, it is very transparent. You might notice a slight slowdown for a minute or so say it you added sixty new documents from a USB key to your internal drive and those had to be indexed... but that's it. But during normal usage, you won't even notice it.
 
No, it is very transparent. You might notice a slight slowdown for a minute or so say it you added sixty new documents from a USB key to your internal drive and those had to be indexed... but that's it. But during normal usage, you won't even notice it.

Okay....thanks. :apple:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.