I would like to use jQuery TypeAhead functionality on my site.
I wo开发者_StackOverflow中文版uld like to use TypeAhead to fetch search results from Active Directory. Active Directory contains about 130,0000 records.
What do you think about this setup?
I am thinking I could create a job that runs nightly (or weekly) that dumps these AD records into SQL Server and query that. Additionally, I am thinking about implementing some type of caching, so I am not querying AD or SQL every time.
Is there a more efficient way of structuring this?
I wouldn't say caching is the right term. You probably want to build indexes for queries such as column like 'blah%'
and column like '%blah'
. However, if you want queries column like '%blah%'
you should simply use the full text search capabilities. See CONTAINS.
精彩评论