: I was thinking may be I could run those queries not one by one but in 
: parallel, in separate threads. But it appears that it takes longer than 
: to run queries one by one.

: Do you have any idea why? Do you think the idea to run those queries in 
: separate threads is good in general? Are SolrIndexSearcher and 
: SimpleFacets thread safe?

SolrIndexSearcher is threadsafe ... SimpleFacets should be thread safe, 
but i won't swear to it off the top of my head.  without seeing exactly 
how you setup your threads, it's hard to guess ... in general multiple 
threads are only useful if you are io bound, or have hardware that can 
take advantage of parallelization (ie: multiple cores).

but it's also possible that things take just as long because all of your 
threads wind up computing the same DocSets at the same time -- or block on 
generating the same FieldCache arrays at the same time.



-Hoss

Reply via email to