lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Strange NullPointerException error
Date Fri, 08 Feb 2002 02:39:09 GMT
Hello,

Several people (copied) reported this bug.
I do not have time to trace the source of the call, got a very early
flight to catch tomorrow, but aparently the instance of TermInfo passed
to SegmentTermPositions' seek(TermInfo) method can be null now.

This is from CVS log for that class:
revision 1.2
date: 2002/01/21 17:07:23;  author: cutting;  state: Exp;  lines: +1 -7
Substantially improved the performance of DateFilter by adding the
ability to reuse TermDocs objects.


cvs diff -r1.1 SegmentTermPositions.java 
Index: SegmentTermPositions.java
===================================================================
RCS file:
/home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/SegmentTermPositions.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SegmentTermPositions.java	18 Sep 2001 16:29:54 -0000	1.1
+++ SegmentTermPositions.java	21 Jan 2002 17:07:23 -0000	1.2
@@ -66,13 +66,7 @@
   
   SegmentTermPositions(SegmentReader p) throws IOException {
     super(p);
-    proxStream = parent.getProxStream();
-  }
-
-  SegmentTermPositions(SegmentReader p, TermInfo ti)
-       throws IOException {
-    this(p);
-    seek(ti);
+    this.proxStream = (InputStream)parent.proxStream.clone();
   }
 
   final void seek(TermInfo ti) throws IOException {


Maybe Doug or somebody else can quickly figure out what has changed...

Otis



--- Manfred Schäfer <mschaefer@bouncy.com> wrote:
> Hi,
> 
> the fully qualified Exception is:
> 
> java.lang.NullPointerException
>         at
> org.apache.lucene.index.SegmentTermPositions.seek(SegmentTermPosition
> s.java:74)
>         at
> org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:78)
> 
>         at
> org.apache.lucene.index.IndexReader.termPositions(IndexReader.java:23
> 0)
>         at
> org.apache.lucene.search.PhraseQuery.scorer(PhraseQuery.java:136)
>         at org.apache.lucene.search.Query.scorer(Query.java:94)
>         at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:105)
> 
>         at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:91)
>         at org.apache.lucene.search.Hits.<init>(Hits.java:81)
>         at org.apache.lucene.search.Searcher.search(Searcher.java:75)
> 
> Otis Gospodnetic wrote:
> 
> > So the problem is that there are no matches, and not the comma in
> the
> > query, is that correct?
> >
> 
> No, no matches is expected. Looks really like there is a problem
> inside
> lucene (i've seen now, that another guy has reported a
> NullPointerException
> which seems to have the same cause, which means, that the problem is
> not
> the comma itself).
> 
> 
> regards,
> 
> Manfred
> 
> 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message