Re: NPE in IndexReader

2007-08-22 Thread Michael Busch
Chris Hostetter wrote: > > This is one of the reasons why i was suggesting in a java-dev thread that > *all* of the refrences to SegmentInfos be refactored out of IndexReader > and into the subclasses -- any attempt to access the SegmentInfos in a OK, I'm convinced that we should refactor segment

Re: NPE in IndexReader

2007-08-21 Thread Chris Hostetter
: I agree segmentInfos are not needed in this case. But it's used in : aquireWriteLock(). What should we do? This is one of the reasons why i was suggesting in a java-dev thread that *all* of the refrences to SegmentInfos be refactored out of IndexReader and into the subclasses -- any attempt to

Re: NPE in IndexReader

2007-08-21 Thread Chris Lu
Right now I am very confused. I agree segmentInfos are not needed in this case. But it's used in aquireWriteLock(). What should we do? -- Chris Lu - Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight.com

Re: NPE in IndexReader

2007-08-21 Thread Chris Hostetter
: I found out in latest MultiReader.java, the "SegmentInfos" is set to null. : However, segmentInfos are used in several places, causing NPEs. : For example, in IndexReader.acquireWriteLock(), MultiReader was refactored into two classes: MultiReader which is now only constructed from other reade

Re: NPE in IndexReader

2007-08-21 Thread Chris Lu
Hi, Eric, I think I have the same problem. I found out in latest MultiReader.java, the "SegmentInfos" is set to null. public MultiReader(IndexReader[] subReaders) throws IOException { super(subReaders.length == 0 ? null : subReaders[0].directory(), null, false, subReaders); } H

Re: NPE in IndexReader

2007-08-21 Thread Michael Busch
Eric Louvard wrote: > Hello while calling IndexReader.deletedoc(int) I am becomming a NPE. > > java.lang.NullPointerException >at > org.apache.lucene.index.IndexReader.acquireWriteLock(IndexReader.java:658) >at > org.apache.lucene.index.IndexReader.deleteDocument(IndexReader.java:6

NPE in IndexReader

2007-08-21 Thread Eric Louvard
Hello while calling IndexReader.deletedoc(int) I am becomming a NPE. java.lang.NullPointerException at org.apache.lucene.index.IndexReader.acquireWriteLock(IndexReader.java:658) at org.apache.lucene.index.IndexReader.deleteDocument(IndexReader.java:686) In the acquireWriteLock m