Mark, I am set up to do these tests with a large term dict. I will see
if there is any improvement.
In my opinion in general, even if the improvement is very small, if
its trivial to rewrite to a faster/simpler query, we should.
Future improvements to lucene might make the simpler query might
beco
bq. I don't think the prefix enumeration is really that much faster than
the wildcard one,
We should do some tests. If it is much faster, this would be a nice
optimization. I think it could be worth it when matching a
lot of terms - never tested though.
Robert Muir wrote:
> separately, perhaps we
sure, I will submit a patch under LUCENE-1951.
will look around at other rewrites too just to be sure there arent others
Thanks,
Robert
On Wed, Oct 7, 2009 at 5:15 AM, Michael McCandless
wrote:
> I agree, this looks like a bug (boost & constant-score-ness is lost)
> -- wanna open an issue & pat
i think it does this already. so like i said, it would be a minor optimization.
On Wed, Oct 7, 2009 at 6:16 AM, Simon Willnauer
wrote:
> This should be handled in WildcardTermEnum instead of overriding
> MultiTermQuery#rewrite(). The WildcardTermEnum could simply return
> false in termCompare if
This should be handled in WildcardTermEnum instead of overriding
MultiTermQuery#rewrite(). The WildcardTermEnum could simply return
false in termCompare if a term is not equal to the "prefix". This
would yield consistent behaviour even if a custom RewriteMethod is
used. Right?!
simon
On Wed, Oct
+1
I think it ought to be faster? PrefixTermEnum just calls .startsWith
on each term text, but WildcardTermEnum has big hairy logic in
wildcardEquals.
Mike
On Tue, Oct 6, 2009 at 11:43 PM, Robert Muir wrote:
> separately, perhaps we should consider doing the prefixquery rewrite
> here for wild
I agree, this looks like a bug (boost & constant-score-ness is lost)
-- wanna open an issue & patch it?
Mike
On Tue, Oct 6, 2009 at 10:22 PM, Robert Muir wrote:
> someone asked this question on the user list:
> http://www.lucidimagination.com/search/document/6f38de391b242102/prefixquery_vs_wildc
separately, perhaps we should consider doing the prefixquery rewrite
here for wildcardquery.
for example, SolrQueryParser will emit these 'wildcardqueries that
should be prefixqueries' if you are using the new reverse stuff for
leading wildcards: WildcardQuery(*foobar) ->
WildcardQuery(U+0001raboo