Akonadi abook: do not filter out email addresses with odd ‘logic’
There is an odd logic that "tries to sort out irrelevant email
addresses" such way that filters out non-matching email addresses
if the search condition matched on one or more. The goal is to make
search by email address more comfortable.
But this behaviour quietly and unfairly prefers matching by email
address over contact name as Erik Quaeghebeur pointed out on Trojitá
mailing list:
"For example, one contact of mine has 4 addresses. The search result
is effectively unique after entering the first four characters of their
first name. However, because this first name only appears in one
address, only that address is returned. I need to type the full first
name and a space to override the logic and trigger true
search-by-contact-name."
So this patch introduces a fairer logic which puts the matching email
addresses first and then the rest - without filtering.
Change-Id: I16b8f74a672c9864d9da994ac90d7bf9738f6001