I've been experimenting to try to see what the logic is behind the ordering. So far it looks like it puts them in date order, but grouped in this order (for searches on a full email address, not a name, in my Inbox):
- Hits in the From field that are flagged
- Hits in the From field that aren't flagged
- Hits in the To field that are flagged
- Hits in the To field that aren't flagged
- Hits in the Cc field that are flagged
- Hits in the CC field that aren't flagged
- Hits in the body and subject line
That ordering applied for hundreds of hits on one email address I entered, but there are a handful I found at the bottom that have a hit in the From field, so there must be more to this. I suspect that it might be putting results in the Cc groups if the sender has Cc'd themself.
Can anyone else replicate these results? Remember, you have to type the actual email address - if you type in a first name and last name then it starts finding partial hits and confusing things. You also need to wait until it's finished searching, as it might insert more results in any position.You might also need to scroll up when it's done, as it might not have the first one selected if it has inserted more results at the top of the list after the initial hits.
Also make sure you have Current Mailbox selected, not All Mailboxes, otherwise it'll be searching your Sent Items too, and confusing things.
If I'm right about this, then it looks like flagging an email from someone could help make sure it'll be in the first group of results.
Apple should be adding some group separators that explain the different groupings, if they insist on having this type of search. The groupings are so complex that it just makes the results look random, and not displaying the times doesn't help either.
I did these test on an iPad, but a quick check looks like the iPhone works the same way. I'm not making excuses for how it works, just trying to make sense of it so I can use the results. I'd much rather they let us specify the field to search.