[thelist] Big drop-down lists.

Francesco francesco at blackcoil.com
Tue Sep 7 23:00:39 CDT 2010

In more detail...

The autocomplete is a .NET user control with parameters.  It's
actually not a proper "select" object at all, but rather a textbox
object with a div that appears below it as results are returned.  Each
site that uses it can pass in a parameter called "ResultCount" which
is typically 10-20 so the div doesn't overpower things.  Who really
wants to scan more than 10-20 rows of data at a time anyway, right?
And yes, the ranking is controlled by 3 DB tables:  Articles,
ArticleTags, and Tags.  As you can guess, ArticleTags contains FKs to
the Article and the Tag, as well as various indexed tinyint columns
for ranking the importance/relevance of a tag to an article.  This is
where SQL index optimization comes in handy.  So in a nutshell, a TOP
X subset of the result set for a query is returned.

Francesco Sanfilippo, Microsoft ASP Insider
mobile: 702.272.8912 | francesco at blackcoil.com

On Tue, Sep 7, 2010 at 8:39 PM, Bill Moseley <moseley at hank.org> wrote:
> On Tue, Sep 7, 2010 at 8:30 PM, Francesco <francesco at blackcoil.com> wrote:
>> I built an "auto-complete drop down" control for a client 2 years ago
>> that has been implemented on over 150 distinct sites, all querying the
>> same SQL database (or cached data sets, for performance enhancement).
>> It's basically a medical term search engine where users type in things
>> like "heart disease" "osteoporosis" "chest pain" and get an
>> autocomplete drop down that updates via Ajax on every character typed
>> after the first 2 characters, retrieving a fresh set of matching
>> keywords, along with a count(*) of results for that keyword.  VERY
>> similar, and actually modeled after, Google Suggest.
> So if you type two characters you get all keywords that start with those two
> characters?  What if those two characters return thousands or matching
> keywords?  Do you ajax fetch just a small number and allow users to scroll
> down to fetch another chunk?
> Google can rank it's terms so if you type two characters it can show you the
> top few terms that start with those letters.   But, if there's no explicit
> ranking of the terms then I wonder how to pick what to show.
> --
> Bill Moseley
> moseley at hank.org
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

More information about the thelist mailing list