lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <>
Subject Bug in DocInvertedPerField?
Date Thu, 02 Jul 2009 14:25:26 GMT
I hit NPE in DocInvertedPerField in the following scenario:
1) Create IndexWriter w/ a null Analyzer.
2) Add two fields to a Document, w/ a TokenStream (or one as not analyzed
and one as TokenStream, or two not analyzed).
3) Add the document to the IndexWriter.
The NPE comes from processFields (line 79), when it tries to read the
position increment gap.

I think I'm using it right, but want to verify. If I always add fields as
TokenStream, or untokenized, I don't really need the Analyzer on
IndexWriter. Also, in case of a TokenStream field, DocInverterPerField just
uses the TokenStream and not the Analyzer. So maybe it should read the
posIncrGap only if analyzer is not null?

Is this a bug or a misuse of IndexWriter by me?


View raw message