I believe AND will be faster, at least in cases when one of the earlier clauses doesn't actually match any docs, in which case the whole query should terminate early and not evaluate the remaining clauses.
Otis ---- Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-lucene.com/ ----- Original Message ---- > From: entdeveloper <cameron.develo...@gmail.com> > To: general@lucene.apache.org > Sent: Mon, April 11, 2011 2:50:28 PM > Subject: Number of Boolean Clauses (AND vs OR) > > Does the type of boolean clause matter for a good number of boolean clauses? > In other words, if I have a query with 20 boolean clauses, will 20 OR > clauses perform any faster or slower than 20 AND clauses? > > I know these would perform completely different queries, but I am asking on > a theoretical level. Obviously the total number matters, hence the limit of > 1024 max boolean clauses > > -- > View this message in context: >http://lucene.472066.n3.nabble.com/Number-of-Boolean-Clauses-AND-vs-OR-tp2807905p2807905.html > > Sent from the Lucene - General mailing list archive at Nabble.com. >