lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yang <teddyyyy...@gmail.com>
Subject RE: Number of Boolean Clauses (AND vs OR)
Date Tue, 12 Apr 2011 15:53:19 GMT
Thanks Doug:

when you say "executed" in parallel, could you please elaborate more
on what "execute" refers to?

I just managed to look through the code. on our Solr setup, by
default, a query "dog cat" (not phrase search) comes to a
DisjunctionSumScorer, and if by "execute" you mean the call to
score(), it seems that the DisjunctionSumScorer still evaluates
score() serially, just iterating down the multiple subscorers queue
"scorerDocQueue", as is in

DisjunctionSumScorer:

  protected boolean advanceAfterCurrent() throws IOException {



ConjunctionScorer looks similar , just different in the way doNext()
iterates through the doc queues.

if the above scenario is indeed run in serial, how could we enable
parallel evaluation? does that need some special config? (this is
lucene 2.9.4 + Solr 1.4.2 )

Thanks a lot
Yang

(this is in response to the thread at
http://lucene.472066.n3.nabble.com/Number-of-Boolean-Clauses-AND-vs-OR-tt2807905.html#a2809558
  but unfortunately I was not subscribed when the thread started , so
posting new now)
###############################
On 04/11/2011 01:25 PM, entdeveloper wrote:
> Thanks Otis. And by your answer, does this mean that individual clauses in a
> boolean query are executed sequentially? not in parallel?

Clauses are executed in parallel.  The execution of a conjunction is
able to efficiently skip occurrences in ranges of documents that do not
contain all clauses, while, for a disjunction, every occurrence of every
clause must be considered.

Doug

Mime
View raw message