Re: CachedSearcher

2002-07-17 Thread David Smiley
On Tuesday, July 16, 2002, at 01:23 PM, Scott Ganyo wrote: > Point taken. Indeed, these were general recommendations that > may/may not > have a strong impact on Lucene's specific use of finalization. My only > specific performance claim is that there will be a negative impact > of some > d

Re: CachedSearcher

2002-07-17 Thread Doug Cutting
Halácsy Péter wrote: > I made an IndexReaderCache class from the code you have sent (the code in >demo/Search.jhtml). > But this causes exception: > IndexSearcher searcher = new IndexSearcher(cache.getReader("/data/index")); > searcher.close(); > > > searcher = new IndexSearcher(cache.getReader

RE: CachedSearcher

2002-07-16 Thread Halácsy Péter
> -Original Message- > From: Doug Cutting [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 6:56 PM > To: Lucene Users List > Subject: Re: CachedSearcher > > > I would be very surprised > if finalizers for > the hundreds of files that Lucene mi

RE: CachedSearcher

2002-07-16 Thread Halácsy Péter
> -Original Message- > From: Doug Cutting [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 6:44 PM > To: Lucene Users List > Subject: Re: CachedSearcher > > > Kelvin Tan wrote: > > If the object has a close() method with public modifier, >

Re: CachedSearcher

2002-07-16 Thread Joshua O'Madadhain
On Tue, 16 Jul 2002, Doug Cutting wrote: > Hang Li wrote: > > Why there are so many final and package-protected methods? > > The package private stuff was motivated by Javadoc. When I wrote > Lucene I wanted the Javadoc to make it easy to use. Thus I did not > want the Javadoc cluttered with l

Re: CachedSearcher

2002-07-16 Thread David Smiley
On Monday, July 15, 2002, at 10:19 PM, Kelvin Tan wrote: >> FSDirectory closes files as they're GC'd, so you >> don't have to explicitly close the IndexReaders or Searchers. >> >> Doug >> > > hmmm...is this documented somewhere? I go through quite abit of trouble > just to close Searchers (beca

Re: CachedSearcher

2002-07-16 Thread Doug Cutting
Hang Li wrote: > Why there are so many final and package-protected methods? The package private stuff was motivated by Javadoc. When I wrote Lucene I wanted the Javadoc to make it easy to use. Thus I did not want the Javadoc cluttered with lots of methods that 99% of users did not need to kno

RE: CachedSearcher

2002-07-16 Thread Scott Ganyo
done with them rather than allowing finalization to take care of it. Scott > -Original Message- > From: Doug Cutting [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 11:56 AM > To: Lucene Users List > Subject: Re: CachedSearcher > > > Scott Ganyo w

Re: CachedSearcher

2002-07-16 Thread Doug Cutting
Scott Ganyo wrote: > I'd like to see the finalize() methods removed from Lucene entirely. In a > system with heavy load and lots of gc, using finalize() causes problems. > [ ... ] > External resources (i.e. file handles) are not released until the reader > is closed. And, as many have found, L

Re: CachedSearcher

2002-07-16 Thread Doug Cutting
Kelvin Tan wrote: > If the object has a close() method with public modifier, isn't it a common > idiom that client code needs to invoke close() explicitly? If there's no > real need to call close, maybe it can be changed to protected? Yes, that is a common idiom. In the case of Lucene's FSDire

RE: CachedSearcher

2002-07-16 Thread Scott Ganyo
lácsy Péter [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 12:43 AM > To: Lucene Users List > Subject: RE: CachedSearcher > > > > > > -Original Message- > > From: Doug Cutting [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, July 16, 2002

Re: CachedSearcher

2002-07-16 Thread Hang Li
Halácsy Péter wrote: > Hello! > A lot of people requested a code to cache opened Searcher objects until the index is >not modified. The first version of this was writed by Scott Ganyo and submitted as >IndexAccessControl to the list. > > Now I've decoupled the logic that is needed to manage sea

RE: CachedSearcher

2002-07-15 Thread Halácsy Péter
> -Original Message- > From: Doug Cutting [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 1:00 AM > To: Lucene Users List > Subject: Re: CachedSearcher > > > Why is this more complicated than the code in demo/Search.jhtml > (included below)?

Re: CachedSearcher

2002-07-15 Thread Kelvin Tan
>FSDirectory closes files as they're GC'd, so you >don't have to explicitly close the IndexReaders or Searchers. > >Doug > hmmm...is this documented somewhere? I go through quite abit of trouble just to close Searchers (because Hits become invalid when the Searcher is closed). If the object has

Re: CachedSearcher

2002-07-15 Thread Doug Cutting
Halácsy Péter wrote: > A lot of people requested a code to cache opened Searcher objects until the index is >not modified. The first version of this was writed by Scott Ganyo and submitted as >IndexAccessControl to the list. > > Now I've decoupled the logic that is needed to manage searher. >