lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Boolean Query search performance
Date Thu, 06 Mar 2008 04:46:50 GMT

: If I do a query.toString(), both queries give different results, which
: is probably a clue (additional paren's with the BooleanQuery)
: 
: Query.toString the old way using queryParser:
:     +(id:1^2.0 id:2 ... ) +type:CORE
: 
: Query.toString the new way using BooleanQuery:
:     +((id:1^2.0) (id:2) ... ) +type:CORE

i didn't look too closely at the psuedo code you posted, but the 
additional parens normally indicates that you are actually creating an 
extra layer of BooleanQueries (ie: a BooleanQuery with only one clause for 
each term) ... but the rewrite method should optimize those away (even 
back in lucene 2.2) ... if you look at query.rewrite(reader).toString() 
then the queries *really* should be the same, if they aren't, then that 
may be your culprit.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message