Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 64681 invoked from network); 7 Jan 2004 22:48:50 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Jan 2004 22:48:50 -0000 Received: (qmail 52452 invoked by uid 500); 7 Jan 2004 22:48:34 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 52435 invoked by uid 500); 7 Jan 2004 22:48:34 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 52418 invoked from network); 7 Jan 2004 22:48:34 -0000 Received: from unknown (HELO sccrmhc11.comcast.net) (204.127.202.55) by daedalus.apache.org with SMTP; 7 Jan 2004 22:48:34 -0000 Received: from apache.org (c-24-5-145-151.client.comcast.net[24.5.145.151]) by comcast.net (sccrmhc11) with SMTP id <2004010722484001100nvdi5e>; Wed, 7 Jan 2004 22:48:40 +0000 Message-ID: <3FFC8CC1.2010803@apache.org> Date: Wed, 07 Jan 2004 14:48:33 -0800 From: Doug Cutting User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Developers List Subject: Re: Parallel search in MultiSearcher References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Jean-Francois Halleux wrote: > as suggested, here is a patch that should parallelize searches among the > various searchables in a MultiSearcher. I only have a single HDD machine but > I guess that spreading index files over multiple HDD can greatly improve > search time when using this MultiSearcher. > > This passes ANT test but be careful as it's been a while since I've > programmed and I don't know Lucene well. That was quick! I have two suggestions. First, I think it might be best if this is a subclass of MultiSearcher, so that the old sequential version is still available. Second, I think the following synchronization goes too far: > + synchronized (MultiSearcherThread.class) { > + if(!hq.insert(scoreDoc)) break; > + } // no more scores > minScore Wouldn't it be sufficient to synchronize on 'hq', e.g.: synchronized (hq) { if(!hq.insert(scoreDoc)) break; } Doug --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org