lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: NPE when adding a Document to an IndexWriter
Date Thu, 10 Jan 2013 02:28:44 GMT

: thanks for your reply.  please see attached.  I tried to maintain the
: structure of the code that I need to use in the library I'm building.  I think
: it should work for you as long as you remove the package declaration at the
: top.

I can't currently try your code, but skimming through it i'd bet money the 
problem is in your Analyzer.  Have you tried simplifying your test down 
and just using "StandardAnalyzer" to rule that out?

In particular i see this...

>>> Analyzer.TokenStreamComponents tsc = new Analyzer.TokenStreamComponents( 
>>>                       getCharTokenizer( reader )
>>>                     , getTokenFilterChain( reader, config ) 
>>>             );

...passing the same Reader to to diff methods there is almost certainly 
not what you want to do.



-Hoss

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message