Re: NPE when adding a Document to an IndexWriter

2013-01-09 Thread Igal @ getRailo.org
I think that all I needed to create the components is: @Override protected Analyzer.TokenStreamComponents createComponents( String fieldName, Reader reader ) { Analyzer.TokenStreamComponents tsc = new Analyzer.TokenStreamComponents( getTokenFilterChain( reader

Re: NPE when adding a Document to an IndexWriter

2013-01-09 Thread Igal @ getRailo.org
hi Hoss -- thank you for your time. it looks like you're right (and it makes sense if the reader is advanced in two places at the same time that it will cause a problem). I'll try to figure out how to create an Analyzer out of the Tokenizer. that's what I was trying to do there and obviously

Re: NPE when adding a Document to an IndexWriter

2013-01-09 Thread Chris Hostetter
: 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'

Re: NPE when adding a Document to an IndexWriter

2013-01-09 Thread Igal @ getRailo.org
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. when I run the attached file I get the following output: debug:

Re: NPE when adding a Document to an IndexWriter

2013-01-09 Thread Chris Hostetter
: I keep getting an NPE when trying to add a Doc to an IndexWriter. I've : minimized my code to very basic code. what am I doing wrong? pseudo-code: can you post a full test that other people can run to try and reproduce? it doesn't even have to be a junit test -- just some complete javacode

NPE when adding a Document to an IndexWriter

2013-01-09 Thread Igal @ getRailo.org
I keep getting an NPE when trying to add a Doc to an IndexWriter. I've minimized my code to very basic code. what am I doing wrong? pseudo-code: Document doc = new Document(); TextField ft; ft = new TextField( "desc1", "word1", Field.Store.YES ); doc.add( ft ); ft = new TextField( "desc2", "