Re: Number of Boolean Clauses (AND vs OR)

2011-04-15 Thread Yang
sorry, please ignore this post . it was an old one from nabble.com

On Mon, Apr 11, 2011 at 6:13 PM, yangyangyyy tedd...@gmail.com wrote:
 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


 ###
 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

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Number-of-Boolean-Clauses-AND-vs-OR-tp2807905p2809558.html
 Sent from the Lucene - General mailing list archive at Nabble.com.



RE: Number of Boolean Clauses (AND vs OR)

2011-04-12 Thread Yang
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


is query cache persisted?

2011-04-12 Thread Yang
I was trying to trace through the calls in Lucene,
and when I invoked the same query for the second time, scorer.score()
is no longer called anymore,
and the query returns very fast.

this seems to be even this case after I restarted tomcat, so I'm
wondering: is the query cache persisted in Lucene?
if so, how could I purge it?

Thanks a lot
Yang


Re: Number of Boolean Clauses (AND vs OR)

2011-04-12 Thread Yang
Thanks a lot Doug

On Tue, Apr 12, 2011 at 10:57 AM, Doug Cutting cutt...@apache.org wrote:
 On 04/12/2011 08:53 AM, Yang wrote:
 when you say executed in parallel, could you please elaborate more
 on what execute refers to?

 I mean that all matches for a query clause are not generally enumerated
 before any results of its containing query are enumerated.  There's
 generally a single thread of execution, so it's not parallel in that sense.

 Doug



Re: is query cache persisted?

2011-04-12 Thread Yang
I'm using solr,

yes I have a setting for queryResultCache:

queryResultCache class=solr.LRUCache size=2
initialSize=1 autowarmCount=5000/



so this cache is stored to disk and still valid across reboots ?

Thanks a lot
yang
On Tue, Apr 12, 2011 at 8:07 PM, Otis Gospodnetic
otis_gospodne...@yahoo.com wrote:
 Hi,

 Are you using raw Lucene or Solr?  If Solr, your query is probably cached in 
 the
 query results cache (see your solrconfig.xml).

 Otis
 
 Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
 Lucene ecosystem search :: http://search-lucene.com/



 - Original Message 
 From: Yang tedd...@gmail.com
 To: general@lucene.apache.org
 Sent: Tue, April 12, 2011 1:35:19 PM
 Subject: is query cache persisted?

 I was trying to trace through the calls in Lucene,
 and when I invoked the  same query for the second time, scorer.score()
 is no longer called  anymore,
 and the query returns very fast.

 this seems to be even this  case after I restarted tomcat, so I'm
 wondering: is the query cache persisted  in Lucene?
 if so, how could I purge it?

 Thanks a lot
 Yang