[pylucene-dev] memory leak status

Andi Vajda vajda at osafoundation.org
Thu Jan 17 11:35:36 PST 2008

On Thu, 17 Jan 2008, Andi Vajda wrote:

> On Thu, 17 Jan 2008, Brian Merrell wrote:
>> I've attached the Indexer.py code.  At line 55, replace:
>> writer = IndexWriter(indexDir, StandardAnalyzer(), True)
>> with:
>> writer = IndexWriter(indexDir, BrianAnalyzer(), True)
>> It isn't entirely clear where I would invoke the finalizeFilters() method 
>> as
>> we only create one instance in our code which is directly passed to the
>> IndexWriter constructor.
> You create only one instance of the analyzer but I think one instance of the 
> filter is created for each document. You could keep a reference to the one 
> analyzer you create and call finalizeFilters() on it after each call to
> indexWriter.addDocument().

I spoke a little fast. Try the above but not the below yet.

> Or, better yet, you could try to use the FinalizerWrapper class just posted 
> by Anurag, it looks very promising in making this finalize() business easier 
> to use.


More information about the pylucene-dev mailing list