Closed
Bug 76593
Opened 24 years ago
Closed 24 years ago
add param for configuring minimal length of strings to search
Categories
(Directory Graveyard :: LDAP XPCOM SDK, defect, P2)
Directory Graveyard
LDAP XPCOM SDK
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: dmosedale, Assigned: dmosedale)
References
Details
Attachments
(3 files)
4.70 KB,
patch
|
Details | Diff | Splinter Review | |
5.00 KB,
patch
|
Details | Diff | Splinter Review | |
5.00 KB,
patch
|
Details | Diff | Splinter Review |
From Leif's comments in 70933:
* As mentioned before, I still believe we need to be careful when we
autocomplete - if a user types just one or two characters ( "j" / "jo"), that
could quite likely generate LDAP searches that are unindex on many LDAP servers.
iPlanet's LDAP servers would most certainly treat such searches (e.g. "cn=j*")
as an unindexed search, since it only index substrings that are 3 characters or
longer.
This should be an attribute on nsILDAPAutoCompleteSession, since different folks
may want this set differently.
![]() |
||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.2
![]() |
||
Updated•24 years ago
|
QA Contact: yulian → olgac
![]() |
||
Comment 1•24 years ago
|
||
reassign to Olga as QA contact
![]() |
||
Updated•24 years ago
|
Target Milestone: mozilla0.9.2 → mozilla0.9.1
![]() |
||
Comment 2•24 years ago
|
||
Setting target milestone to 0.9.2 (check it in anytime, even before, when the
tree is open for). Per PDT triage.
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Assignee | ||
Comment 3•24 years ago
|
||
Comment 5•24 years ago
|
||
Looks good. R=ducarroz
Comment 6•24 years ago
|
||
Looks good, two *very* nit-picky comments, that you can consider at your own
discretion:
> Strings shorter than this will return
> * |nsIAutoCompleteStatus::ignored| rather than triggering a
> * search. This is desirable because many LDAP servers do not
> * index strings that are too short, which means that searching
> * them will be much less efficient. If unset, defaults to 3,
> * since that's a popular LDAP server minimum indexing size.
You might want to explain that "searching" here really means "substring
searching". I.e. this really only is an issue if you have wildcards in a search
(e.g. cn=*leif*), since some LDAP servers will not index substrings that are
shorter than 3 characters. You might also want to mention the behaviour of
"anchoring" the search, e.g. "cn=le*", which would be an indexed search).
Also, would it be more readable to #define a constant like
|kDefaultMinStringLength| with the default "3" somewhere in the beginning of the
|.cpp| or |.h| file?
So, R=leif
Assignee | ||
Comment 7•24 years ago
|
||
Assignee | ||
Comment 8•24 years ago
|
||
Assignee | ||
Comment 9•24 years ago
|
||
OK, patch v2 (mozilla hung, which is why it got attached twice) is here. It has
three changes:
* instead of using ${directoryServer}.minStringLength, changed it to
${directoryServer}.autoComplete.minStringLength, since this parameter doesn't
apply to all searches using this directory server
* made a small optimization suggested by leif: make sure that mMinStringLength
is non-zero before bothering to call nsCRT::strlen on the search string.
* after discussion with Leif, changed the default from a 3 character minimum
to 0 (no minimum). This is because the deployed base of autocomplete users
today already has directory servers which can handle the entire range of
searches (since that's what 4.x does), performance in mozilla even in big
searches is reasonable, and having any limit at all is somewhat unintuitive from
a naive user's point of view, since there are a non-trivial number of people
with (eg) two character last names.
![]() |
||
Comment 10•24 years ago
|
||
r=srilatha on the diffs for MsgComposeCommands.js
![]() |
||
Comment 11•24 years ago
|
||
sr=bienvenu
Assignee | ||
Comment 12•24 years ago
|
||
Patch checked in,
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
![]() |
||
Comment 13•24 years ago
|
||
minStringLength works, hidden pref works
Verified on WinNT 4.0 , MacOS 9.1, Linux RH7.1 with 2001053004, 2001060611 builds.
Setting minStringLength to 0 (by default) though causes a hang when we
search with just one char entered. I'll open a new bug on this with more comments.
Marking this bug as verified.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•