Re: Query rewriting/optimization

2009-06-22 Thread Luis Alves
look at http://issues.apache.org/jira/browse/LUCENE-1567 (New flexible query parser) This new parser allows for internally rewrites/optimizes Query, and it is backward compatible. Preetham Kajekar wrote: Hi, I am wondering if Lucene internally rewrites/optimizes Query. I am programatically

Re: Query rewriting/optimization

2009-06-18 Thread Chris Hostetter
: > ((Src:Testing Dst:Test) (Src:Test2 Port:http)). : > In this case, would Lucene optimize to remove the unwanted BooleanQueries ? : Alas, Lucene in general does not do such structural optimization (and : I agree, we should). EG we could do it during Query.rewrite(). Except that flattening Boo

Re: Query rewriting/optimization

2009-05-21 Thread Preetham Kajekar
Thanks for the response ! Will post my findings. Thx, ~preetham Michael McCandless wrote: Alas, Lucene in general does not do such structural optimization (and I agree, we should). EG we could do it during Query.rewrite(). There are certain corner cases that are handled, eg a BooleanQuery wit

Re: Query rewriting/optimization

2009-05-21 Thread Michael McCandless
Alas, Lucene in general does not do such structural optimization (and I agree, we should). EG we could do it during Query.rewrite(). There are certain corner cases that are handled, eg a BooleanQuery with a single BooleanClause, or BooleanQuery where minimumNumberShouldMatch exceeds the number of

Query rewriting/optimization

2009-05-21 Thread Preetham Kajekar
Hi, I am wondering if Lucene internally rewrites/optimizes Query. I am programatically generating Query based on various user options, and quite often I have BooleanQueri'es wrapped inside BooleanQueries etc. Like, ((Src:Testing Dst:Test) (Src:Test2 Port:http)). In this case, would Lucene optim