Tuesday, August 11, 2009

Windows Mail search quirk misses emails.

Yes yes Windows Mail evil etc. I don't use it as my main email programme, but it's a handy built-in programme for one of the computers I use.

Anyone there it was and I needed to find all the emails from a certain person. I click on Find, type in the name, and there they all are. I open the one I want and continue.

Except somewhere in the back and forth I shut-down the Find window with its result list - damn there was another I needed now. Oh well no problem I open up Find again and repeat my search - 0 results. Say what?

I re-sort my main list and check yep they're still there and haven't been deleted. Now I've got them listed here, but still why couldn't Find um find them? I tried a few other ways of searching with no luck, Find was still happy to show me other people or items just not that list I had up before.

Then it clicked - I still had open the email I'd picked from the first search. I closed it down and re-searched. The list appeared.

Just to demonstrate this behaviour do a search, open one of the found items then without closing anything simply hit the Find Now button and see the 0 result replacing the list you saw a moment ago.

So it appears if you do a search in Windows Mail then open one of those items everything in the results list is hidden to subsequent searches until you close that item.

Now when you open an item from the search result the previous/next arrow buttons step you through that result list. So what happens if you search for something else and open an item from that result? Same thing happens as before. Each of the items retains its own result list to step through while at the same time both lists are excluded from any subsequent search while they remain open.

So just for fun I open a Find dialogue and do a search. Then without opening an item from that results list I open another Find dialogue and perform the same search - 0 results

The simplest thing I can think off is that each results list locks each item within it and prevents it from being searched; except why?

Imagine a hypothetical situation where you do a search for the Red list. Now open a new Find dialogue and do a Blue search. Now finally do a Red + Blue search - 0 results because all the Red and Blue items are 'hidden'.


The former has been stricken as now it appears to be doing something else - Do a search for, say, "Dan H" and I get a list of results, now open a new dialogue and do a search for say "Orphi" and I get 0 results. Now Dan in the comments below suggests it may be using the existing list to restrict the search - except if you repeat the search you don't return the same list you get 0 results.

Now just for fun I did a search on my Inbox and got a result then opened a new search for my Sent Items and... got a result back. So it appears that each search locks the 'folder' it's searching in. Now this kind of makes sense when you consider how Windows Mail stores things - each item is a file stored in a corresponding directory so it may well be locking out that directory.

Just to go one further if you run a search on the "Local Folders" that includes subdirectories then try to run another search all folders are 'locked' if you run a search without subdirectories they're all 'unlocked'.

However as mentioned in the struck out section opening an item from the results list also seems to maintain that lock possibly in order for the previous/next buttons to step you through the results list and to answer Dan's question opening an item directly from the folder doesn't exclude it from the results.

So opening an item from the folder doesn't make the folder unsearchable, but opening one from a search result (or simply running a search that looks at that folder) does.

Okay sure it's a small free mail programme, but only being able to perform one search at a time and best of all not preventing you from performing multiple borked searches or even telling you that's what it's doing; nice, very nice.

Oops one final point for information this is for Vista which as I'm sure we're all aware uses a strange new search method, however running this same search via the built-in index doesn't produce the same 0 results. So Windows Mail doesn't seem to run using the Vista Index, which makes sense seeing as it can also run on XP.

2 comments:

Dan H said...

Are you sure it's not just trying to be clever and using the open email to restrict the search? So, when you have an email open, the Find operation searches for things inside that message, or maybe for mails with some property in common with that message? What happens if you try just opening the same message from the inbox and then searching?

FlipC said...

I've amended the entry because now it seems to be doing something different to yesterday.