Last modified: 2011-03-13 18:06:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14139 - Autocomplete should not kick in till at least 2 characters
Autocomplete should not kick in till at least 2 characters
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
All All
: Lowest enhancement with 1 vote (vote)
: ---
Assigned To: Robert Stojnic
Depends on:
  Show dependency treegraph
Reported: 2008-05-15 16:28 UTC by paul irish
Modified: 2011-03-13 18:06 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description paul irish 2008-05-15 16:28:08 UTC
To preserve apparent responsiveness and deliver the most relevant results quickly, I suggest that the search suggest functionality shouldn't make an ajax call until there are at least two characters already typed in the box.


Line 481 of mwsuggest.js:
if (query.length>=2) os_fetchResults(r,query,os_search_timeout);

Btw- more best practices here:
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-05-15 16:31:21 UTC
An unusual first character such as ! or, I don't know, γ (on, say, enwiki) can return meaningful results without a second one being provided.
Comment 2 Brion Vibber 2008-05-15 16:41:04 UTC
Agreed; consider also CJK, where one Unicode character may carry significantly more information.
Comment 3 Craig 2008-05-15 21:45:52 UTC
I agree with paul irish that searching shouldn't start until the 2nd character is entered into the search box, but I do see the point about CJK. Perhaps a solution like the following filter being run on the client side would work:

if (query.length >=2 && ! query.match(/[A-Za-z]/))

That would still execute the search after the first character for CJK languages, greek characters, !'s, and all those other non-Latin letters.
Comment 4 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-05-15 22:32:02 UTC
I think you meant || there, not &&.

Note You need to log in before you can comment on or make changes to this bug.