From java-user-return-37529-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Thu Dec 04 22:26:32 2008 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 27286 invoked from network); 4 Dec 2008 22:26:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2008 22:26:32 -0000 Received: (qmail 94567 invoked by uid 500); 4 Dec 2008 22:26:37 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 94536 invoked by uid 500); 4 Dec 2008 22:26:37 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 94519 invoked by uid 99); 4 Dec 2008 22:26:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2008 14:26:37 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [194.109.24.27] (HELO smtp-vbr7.xs4all.nl) (194.109.24.27) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2008 22:25:07 +0000 Received: from webmail.xs4all.nl (dovemail4.xs4all.nl [194.109.26.6]) by smtp-vbr7.xs4all.nl (8.13.8/8.13.8) with ESMTP id mB4MPNbh053228 for ; Thu, 4 Dec 2008 23:25:23 +0100 (CET) (envelope-from wheijke@xs4all.nl) Received: from 62.194.57.217 (SquirrelMail authenticated user wheijke) by webmail.xs4all.nl with HTTP; Thu, 4 Dec 2008 23:25:23 +0100 (CET) Message-ID: <23861.62.194.57.217.1228429523.squirrel@webmail.xs4all.nl> Date: Thu, 4 Dec 2008 23:25:23 +0100 (CET) Subject: Re: NIOFSDirectory From: "Wouter Heijke" To: java-user@lucene.apache.org User-Agent: SquirrelMail/1.4.11 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org I had the same problem, only got it to work when I set the system property the way you do... UGLY! So if there is a solution like you ask for that use 2.4 I would be interested to know as well. Wouter > That does not help. The File/path is not stored with the instance. It is > in > a map FSDirectory keeps statically. Should subclasses of FSDirectory be > modifying the map? > This is not a question about how to subclass or customize FSDirectory. > This > is more on how to use NIOFSDirectory class. I am hoping for a simply > answer, > is what I am doing (setting the class name statically on system property) > the right way? > > -John > > On Thu, Dec 4, 2008 at 2:00 PM, Yonik Seeley wrote: > >> On Thu, Dec 4, 2008 at 4:32 PM, Glen Newton >> wrote: >> > Sorry....what version are we talking about? :-) >> >> The current development version of Lucene allows you to directly >> instantiate FSDirectory subclasses. >> >> -Yonik >> >> >> > thanks, >> > >> > Glen >> > >> > 2008/12/4 Yonik Seeley : >> >> On Thu, Dec 4, 2008 at 4:11 PM, John Wang >> wrote: >> >>> Hi guys: >> >>> We did some profiling and benchmarking: >> >>> >> >>> The thread contention on FSDIrectory is gone, and for the set of >> queries >> >>> we are running, performance improved by a factor of 5 (to be >> conservative). >> >>> >> >>> Great job, this is awesome, a simple change and made a huge >> difference. >> >>> >> >>> To get NIOFSDirectory installed, I didn't find any documentation >> >>> (doesn't mean there aren't any), after reading the code, I resorted >> to: >> >>> >> >>> static >> >>> { >> >>> >> >>> >> System.setProperty("org.apache.lucene.FSDirectory.class",NIOFSDirectory.class.getName()); >> >>> } >> >>> I am sure this is not the intended usage, as this is really ugly. >> What is >> >>> the suggested usage? >> >> >> >> Instantiate NIOFSDirectory directly and pass it to the >> IndexReader.open() >> >> >> >> -Yonik >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> >> >> >> > >> > >> > >> > -- >> > >> > - >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> > For additional commands, e-mail: java-user-help@lucene.apache.org >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org