Lucene's internals are somewhat different than a typical database system. For instance, to execute a wildcard query, it needs to retrieve all tokens found in this field in all documents that match the wildcard. Then it turns this into an "OR" query and goes from there. Things get a bit better with a "starts with" type of wildcard, but it still ends up with some prep work and an OR-type query, I believe.
Dmitry.
Erik Hatcher wrote:
On Thursday, October 23, 2003, at 06:15 AM, Daniel Penning wrote:
EH> Do you have some performance numbers to go with this?
+_key:23/* -> 801 hits 80-90 ms +24:8397 -> 10 hits <10 ms +24:8397 +_key:23/* -> 5 hits 80-90 ms
Info: The index size is 118kb.
Thanks for the numbers.
The execution time when using a QueryFilter is nearly the same (~10ms faster).
Keep in mind that QueryFilter will only be faster on successive uses of it (the same instance, that is) as it caches the bitset of matching documents, so successive calls only search the matched ones from the first time around.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]