澳土及other .NET junkies, 請教string search

If you have used the AJAX Toolkit AutoCompleteExtender, you know it queries a web service continueously as user is typing. Same as when you search on Google or Yahoo, it suggests kewords as you type. My question has nothing to do with, just give you a context.

How to make the server end string as fast as possible. Say I have 50,000 keywords that can be read from a static file into a generic List or any other collection type easily. What's the best way to implement the partial string match? say I want to start matching when user types in 2 characters. Doing List.Find() is too slow. Implementing a tree?

澳土, hope all the reading you do can help. Thanks dude.

所有跟帖: 

淺見啊~~ -LiYouCai- 給 LiYouCai 發送悄悄話 LiYouCai 的博客首頁 (256 bytes) () 01/20/2009 postreply 22:06:02

兄台所見極是 -catcherintherye- 給 catcherintherye 發送悄悄話 (1195 bytes) () 01/20/2009 postreply 22:46:54

gotta be careful about the size of collection -澳洲老土- 給 澳洲老土 發送悄悄話 (208 bytes) () 01/21/2009 postreply 00:03:46

初步的想法.... -澳洲老土- 給 澳洲老土 發送悄悄話 (1191 bytes) () 01/20/2009 postreply 23:05:43

補充:solution 1可以用regular expresion,當然... -澳洲老土- 給 澳洲老土 發送悄悄話 (66 bytes) () 01/20/2009 postreply 23:15:58

For solution 2. read this..... -澳洲老土- 給 澳洲老土 發送悄悄話 (419 bytes) () 01/21/2009 postreply 00:15:36

Thanks a lot. You gave me some additional leads. -catcherintherye- 給 catcherintherye 發送悄悄話 (0 bytes) () 01/21/2009 postreply 14:44:10

請您先登陸,再發跟帖!