Re: New Control Centre



Hi,

On Tue, 2007-02-06 at 16:30 +0000, jamie wrote:
> The only way to do wildcards with a hashtable is a full table scan - if
> you have a million unique words/keys in the hashtable then you have to
> glob each one to determine if the word matches the wildcard.
>
> The above is ridiculously slow compared to a btree which sorts the words
> in alphabetic order so only a small subset needs to be searched.

Dude, what are you talking about?  Lucene isn't a hash table, its terms
are ordered in the inverted index so you could do a binary search here
too.

The only time when a wildcard search breaks down in Lucene is when it's
at the beginning of a term ("*bar").  I don't know how sqlite would
handle this internally either if the words are sorted in alphabetic
order, but you can do some hacks to make this fast in Lucene if its a
common use case.

Joe




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]