Silky:
I'm really not sure if you are just being argumentative or you failed to
read what the original request was. Winston pretty clearly stated that he
was after :
" Filtering is filtered based on a contains for each item. So it's
essentially mimicing VS2010's contains for intellisense."

In case you don't get that, it's a bit like if there is a display name field
and someone wants to have the list filtered by those that contain "Smith"
whether Smith be the suffix or appear *anywhere* in the string.  Eg "Jane
Smith", "Smith, John" etc.

If you really think that a Trie is the correct approach, then show us your
code. I doubt very much you can prove your assertion and am happy to bet you
won't ;)  (name the charity)


|-----Original Message-----
|From: [email protected] [mailto:ozdotnet-
|[email protected]] On Behalf Of silky
|Sent: Monday, 17 May 2010 4:16 PM
|To: ozDotNet
|Subject: Re: Filtering algorithm strategies to mimic intellisense
|
|On Mon, May 17, 2010 at 3:23 PM, Bill McCarthy <[email protected]>
|wrote:
|> Yep. Make sure you are checking the new search string starts with the old
|> search string. If it doesn't then filter from the original data,
otherwise
|> filter from the last filter.  And create new lists, not remove from old
|> ones; removal is slow and costly with array backed lists.
|> The trick is to use originally sorted lists, cached, and to also cache
the
|> last filter.. don't use compound queries.
|>
|> Oh and also don't use data structures like a Trie: that'd be a complete
|> waste of time if you are doing a substring search as you'd still have to
|> search the entire tree.
|
|Uh yes, the obvious implication of my suggestion being that a Trie is
|the *correct* approach (i.e. substring is not correct).
|
|--
|silky
|
|  http://www.programmingbranch.com/

Reply via email to