I'm playing with 2.4.1 RC3 (on OS X 10.5.6) and found a few issues:
* If I fail to call lucene.initVM, I get a rather unfriendly Bus
Error. Is it possible (desirable?) to detect this and throw a
friendly exception instead?
* When I hit an exception in Java, the carryover to Python fails to
include the full stack trace (sources & line numbers) from Java,
which makes debugging harder. Is that normal?
* I'm attempting to re-use a field, by changing its value, and then
adding the document to an index:
lucene.initVM(lucene.CLASSPATH)
writer = lucene.IndexWriter(lucene.RAMDirectory(),
lucene.StandardAnalyzer())
doc = lucene.Document()
field = lucene.Field('field', '', lucene.Field.Store.NO,
lucene.Field.Index.NOT_ANALYZED)
field.setValue('abc')
doc.add(field)
writer.addDocument(doc)
writer.close()
However, unexpectedly I hit a Java NullPointerException in the
writer.addDocument. I hit a different exception if I use
lucene.Field.Index.ANALYZED instead. The corresponding code in
Lucene should work fine I think.
Mike