Re: [Tutor] Searching through large number of string items

2008-04-10 Thread Kent Johnson
Dinesh B Vadhia wrote: > Ignore the 'adjacent items' remark. The rest is correct ie. looking > for all strings containing a substring x. Perhaps this would help: http://hkn.eecs.berkeley.edu/~dyoo/python/suffix_trees/ A SubstringDict that maps each string to itself would do exactly what you w

Re: [Tutor] Searching through large number of string items

2008-04-10 Thread Greg Graham
B Vadhia Sent: Thursday, April 10, 2008 8:13 AM To: tutor@python.org Subject: Re: [Tutor] Searching through large number of string items The 10,000 string items are sorted. The way the autocomplete works is that when a user enters a char eg. 'f', the 'f' is sent to the s

Re: [Tutor] Searching through large number of string items

2008-04-10 Thread Dinesh B Vadhia
Ignore the 'adjacent items' remark. The rest is correct ie. looking for all strings containing a substring x. - Original Message - From: Kent Johnson To: Dinesh B Vadhia Cc: tutor@python.org Sent: Thursday, April 10, 2008 6:32 AM Subject: Re: [Tutor] Searching through la

Re: [Tutor] Searching through large number of string items

2008-04-10 Thread Kent Johnson
Dinesh B Vadhia wrote: > The 10,000 string items are sorted. > > The way the autocomplete works is that when a user enters a char eg. > 'f', the 'f' is sent to the server and returns strings with the char > 'f'. If it is all strings containing 'f' (not all strings starting with 'f') then the

Re: [Tutor] Searching through large number of string items

2008-04-10 Thread Dinesh B Vadhia
The 10,000 string items are sorted. The way the autocomplete works is that when a user enters a char eg. 'f', the 'f' is sent to the server and returns strings with the char 'f'. You can limit the number of items sent back to the browser (say, limit to between 15 and 100). The string items co