Open Bug 556490 Opened 15 years ago Updated 2 years ago

Implement pref for filter/search template in LDAP recipient autocompletion (similar to existing pref "mail.addr_book.quicksearchquery.format")

Categories

(Thunderbird :: Address Book, defect)

defect

Tracking

(Not tracked)

People

(Reporter: tbu, Unassigned)

References

Details

User-Agent: Opera/9.80 (Windows NT 6.1; U; de) Presto/2.5.22 Version/10.51 Build Identifier: Thunderbird/3.0.4 If I understand your sourcecode at http://mxr.mozilla.org/mozilla/source/mailnews/addrbook/src/nsLDAPAutoCompleteSession.cpp#74 correctly the search filter for autocompleting by using a ldap-server is hardcoded to "(|(cn=%v1*%v2-*)(mail=%v1*%v2-*)(sn=%v1*%v2-*))". I tested the autocompletion with the string "GmbH" and the ldap-server-log-file shows me following search line: Apr 1 13:02:43 pbgldap1 slapd[4168]: conn=6 op=5 SRCH base="dc=myTBTest" scope=1 deref=0 filter="(|(cn=gmbh*)(mail=gmbh*)(sn=gmbh*))" I can't influence this searchstring by editing the configuration-value of "mail.addr_book.quicksearchquery.format". Changes in this Configuration only affects the searchstring in the addressbook-search. Perhaps you can use the configuration of "mail.addr_book.quicksearchquery.format" for autocompletion too. With kind regards, Timo Bunger Reproducible: Always Steps to Reproduce: 1.set up ldap account 2.set up the customized search-string in about:config, "mail.addr_book.quicksearchquery.format" and test it in addressbooksearch 3.send an email with the autocompletion feature, it will not use the customized searchstring from "mail.addr_book.quicksearchquery.format" Actual Results: The autocompletion feature doesn't use the customized search string from "mail.addr_book.quicksearchquery.format" Expected Results: The autocompletion feature should use the customized search string from "mail.addr_book.quicksearchquery.format"
Component: Message Compose Window → Address Book
QA Contact: message-compose → address-book
This is going in the right direction, and probably trying to solve the same problem as related bug 558931, namely that the current autocomplete search algorithm in composition is insufficient and also inconsistent with AB quicksearch.
OS: Windows 7 → All
Hardware: x86_64 → All
See Also: → 558931
(In reply to Timo Bunger from comment #0) > If I understand your sourcecode at > http://mxr.mozilla.org/mozilla/source/mailnews/addrbook/src/ > nsLDAPAutoCompleteSession.cpp#74 correctly the search filter for > autocompleting by using a ldap-server is hardcoded to > "(|(cn=%v1*%v2-*)(mail=%v1*%v2-*)(sn=%v1*%v2-*))". Indeed. And so poorly in many ways. > I tested the autocompletion with the string "GmbH" and the > ldap-server-log-file shows me following search line: > > Apr 1 13:02:43 pbgldap1 slapd[4168]: conn=6 op=5 SRCH base="dc=myTBTest" > scope=1 deref=0 filter="(|(cn=gmbh*)(mail=gmbh*)(sn=gmbh*))" > > I can't influence this searchstring by editing the configuration-value of > "mail.addr_book.quicksearchquery.format". Changes in this Configuration only > affects the searchstring in the addressbook-search. Compare: mail.addr_book.quicksearchquery.format: ?(or(PrimaryEmail,c,@V)(DisplayName,c,@V)(FirstName,c,@V)(LastName,c,@V)) vs. LDAP autocomplete filter template (hardcoded): 74 mFilterTemplate("(|(cn=%v1*%v2-*)(mail=%v1*%v2-*)(sn=%v1*%v2-*))"), http://mxr.mozilla.org/mozilla/source/mailnews/addrbook/src/nsLDAPAutoCompleteSession.cpp#74 Timo (or anyone), can you test if changing the "mail.addr_book.quicksearchquery.format" pref (e.g. excluding all names and only search for email) also changes search results for LDAP search in AB? I think that's unlikely, because the LDAP search template looks different so there would have to be some kind of conversion between the local search pref and the required LDAP template. > Perhaps you can use the configuration of > "mail.addr_book.quicksearchquery.format" for autocompletion too. There's two aspects to this: 1) Do we really want the very same pref for ab quicksearch and recipient autocomplete? - probably yes (imo, the default /behaviour/ of ab quicksearch and autocomplete should definitely be the same, but we might still want /separate prefs/ for each of them which are identical by default but can be customized; otoh, it would be very odd to allow competing behaviour between recipient autocomplete and contacts side bar, which also operates like AB quicksearch...) 2) Can we unify such pref(s) for local AB and LDAP? (That sounds complex and hackish, so imo rather not) Depending on answers, we need between 1 and 4 prefs here to cover all cases. Until further clarification of desired UI and technical realization, morphing this bug to err on the safe side.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: autocompletion does not use search filter "mail.addr_book.quicksearchquery.format" → Implement pref for filter/search template in LDAP recipient autocompletion (similar to existing pref "mail.addr_book.quicksearchquery.format")
(In reply to Timo Bunger from comment #0) > If I understand your sourcecode at > http://mxr.mozilla.org/mozilla/source/mailnews/addrbook/src/ > nsLDAPAutoCompleteSession.cpp#74 correctly the search filter for > autocompleting by using a ldap-server is hardcoded to > "(|(cn=%v1*%v2-*)(mail=%v1*%v2-*)(sn=%v1*%v2-*))". > I tested the autocompletion with the string "GmbH" and the > ldap-server-log-file shows me following search line: > > Apr 1 13:02:43 pbgldap1 slapd[4168]: conn=6 op=5 SRCH base="dc=myTBTest" > scope=1 deref=0 filter="(|(cn=gmbh*)(mail=gmbh*)(sn=gmbh*))" Timo, or anybody on LDAP, can you please post the LDAP server log for autocompleting these words: "foo bar" (without quotes) "foo bar baz" (without quotes) Iow, I want to find out what %v2-* does in (cn=%v1*%v2-*) filter expression. Anyone out there who's familiar with LDAP? Please let us know, I have more questions here. Mental note: We need to port new search algorithm of bug 529584 and bug 558931 to LDAP as far as possible. The mFilterTemplate looks like a good starting point per log output: "(|(cn=gmbh*)(mail=gmbh*)(sn=gmbh*))"
Flags: needinfo?
I don't know much about LDAP/LDIF, but e.g. why are we not searching more of the common fields like givenname:... ?
Flags: needinfo?
^^ comment 2, comment 3, comment 4 automatic removel of needinfo?anyone without opt-in still driving me mad!!!
Flags: needinfo?
Flags: needinfo?
See Also: → 298438, 529584
(In reply to Thomas D. (away till 31st January) from comment #5) > ^^ comment 2, comment 3, comment 4 > > automatic removel of needinfo?anyone without opt-in still driving me mad!!!
Flags: needinfo?
The LDAP autocomplete query is controlled by the <server>.autoComplete.filterTemplate pref not mail.addr_book.quicksearchquery.format. Does that not work?
Flags: needinfo?
See Also: → 327263
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.