开发者

How to set up jQuery TypeAhead to work with a large collection

开发者 https://www.devze.com 2023-04-12 11:26 出处:网络
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 1

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消