Re: NullPointerException using IndexReader.termDocs when there are no matches

2012-05-18 Thread Michael McCandless
a next() method. > >> -Original Message- >> From: Michael McCandless [mailto:luc...@mikemccandless.com] >> Sent: Thursday, May 17, 2012 6:20 PM >> To: java-user@lucene.apache.org >> Subject: Re: NullPointerException using IndexReader.termDocs when there >

RE: NullPointerException using IndexReader.termDocs when there are no matches

2012-05-18 Thread Edward W. Rouse
gt; Subject: Re: NullPointerException using IndexReader.termDocs when there > are no matches > > I think you need to pay attention to what td.next() returned; I > suspect in your case it returned false which means you cannot use any > of its APIs (.doc(), .freq(), etc.) after that.

Re: NullPointerException using IndexReader.termDocs when there are no matches

2012-05-17 Thread Michael McCandless
I think you need to pay attention to what td.next() returned; I suspect in your case it returned false which means you cannot use any of its APIs (.doc(), .freq(), etc.) after that. Mike McCandless http://blog.mikemccandless.com On Thu, May 17, 2012 at 5:52 PM, Edward W. Rouse wrote: > Lucene 3