Recipient autocomplete returns results that don't have the (single-letter) search term anywhere

RESOLVED INVALID

Status

Thunderbird
Address Book
RESOLVED INVALID
3 years ago
3 years ago

People

(Reporter: Angelika, Unassigned)

Tracking

31 Branch
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release)
Build ID: 20140715214327

Steps to reproduce:

Tried to use address book auto-complete. 


Actual results:

Typed the letter D into the "to" field, expecting the address book to offer me addresses starting in D, or at least with a D somewhere in them... the first address that came up didn't have a single D. Typed the letter U - the first three addresses didn't have a single U in them. Same with several other letters. (I decided to experiment after getting that D-less address on typing the letter D)


Expected results:

I should have been offered addresses that contained the letters I entered, not random addresses containing lots of other letters but not the ones I entered.

Comment 1

3 years ago
Angelika, thanks for your time to file this.

However, it's technically impossible that TB returns a card that doesn't have the letter you searched for in one of the card fields that we search. Find below the original code that creates autocomplete search, and you can see that we search exactly all of the following card fields:

Display Name, First Name, Last Name, NickName, PrimaryEmail, SecondEmail, (and, only for mailing lists, the Notes field).

So if you go to your AB and open the cards which were found, there MUST be that letter somewhere in these fields. Some people have duplicate cards for the same person without being aware of it. In autocomplete, TB will find all matching cards from *all* of your address books. By default, TB collects addresses into Collected Adresses whenever you send messages. Maybe there are entries which are similar to your hand-made entries but you're not aware of them.

It's true however you might not *see* any matching letter in your autocomplete result, because the result list only shows
Display Name <Email>
so you'll never see First Name, Last Name, NickName in the autocomplete result but all of these are still searched and might cause the match.

I hope that explains it.
If you still think there's a *technical* bug here returning results which don't match, please send me details of your search term and all the respective field values of found cards via private email. Make sure to search all of your ABs with same search term, and inspect all the matching cards from AB. You need Tools > Address book for that.

(I know you're unhappy with the new behaviour, but that's another story.)

+      let modelQuery = "(or(DisplayName,c,@V)(FirstName,c,@V)(LastName,c,@V)" +
+                       "(NickName,c,@V)(PrimaryEmail,c,@V)(SecondEmail,c,@V)" +
+                       "(and(IsMailList,=,TRUE)(Notes,c,@V)))";



+    let cumulativeFieldText = aCard.displayName + " " +
+                              aCard.firstName + " " +
+                              aCard.lastName + " " +
+                              aEmailToUse + " " +
+                              aCard.getProperty("NickName", "");
+    if (aCard.isMailList)
+      cumulativeFieldText += " " + aCard.getProperty("Notes", "");
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID

Updated

3 years ago
Summary: Address book auto-complete is just full of bugs... → Recipient autocomplete returns results that don't have the (single-letter) search term anywhere

Updated

3 years ago
Component: Untriaged → Address Book

Comment 2

3 years ago
Oh, and here's another caveat:

Autocomplete matches on NickName field,
BUT Contacts Side Bar and Address Book searches do NOT match NickName field (Bug 118624)

So to find those, you'll need advanced search from the main AB: Edit > Search addresses (Ctrl+Shift+F), then specify Nickname contains "D"
You need to log in before you can comment on or make changes to this bug.