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().

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.

Andi..
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to