: > ((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 BooleanQueries wouldn't be an optimization -- it would be a restructuring that would actually change the scores computed (based on the effect of the coord function). "((A B) (C D))" is a fundementally different query from "(A B C D)" .. the client code should controll which gets built. : There are certain corner cases that are handled, eg a BooleanQuery : with a single BooleanClause, or BooleanQuery where : minimumNumberShouldMatch exceeds the number of SHOULD clauses : immediately returns no matches, etc. ...for the record, these *are* genuiune optimizations, the scores produced are the same as if they weren't there. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org