Mailing List Archive

Phrase problem
I'm having a problem search on phrases. If I give the query
books by "Noam Chomsky" about politics
then I get a null pointer exception at the point where I issue the
query. I put the above string through QueryParser to get the Query, and
the exception happens on the IndexSearcher search call. The same thing
happens when I use a query I have constructed myself. Printing the query
is fine in either case: it shows
Text:books Text:"noam chomsky" Text:about Text:politics
Also, doing the query without the quotes works properly, so it isn't a
problem with the index or the way I use the query parser.

So far as I can tell, the exception arises in PhraseQuery.scorer, at the
line which says
TermPositions p = reader.termPositions((Term)terms.elementAt(i));
I'm using lucene 1.2 rc3.

Any ideas?

-- David Elworthy


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: Phrase problem [ In reply to ]
> From: David Elworthy [mailto:dahe@lingomotors.com]

> I'm having a problem search on phrases. If I give the query
> books by "Noam Chomsky" about politics
> then I get a null pointer exception at the point where I issue the
> query.
> I'm using lucene 1.2 rc3.
>
> Any ideas?

Upgrade to rc4. This was fixed.

Doug

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Phrase problem [ In reply to ]
Try rc4. There was a bug in rc3 that gave NullPointerException
on phrase searches when one or more of the terms wasn't in the
index.


--
Ian.

David Elworthy wrote:
>
> I'm having a problem search on phrases. If I give the query
> books by "Noam Chomsky" about politics
> then I get a null pointer exception at the point where I issue the
> query. I put the above string through QueryParser to get the Query, and
> the exception happens on the IndexSearcher search call. The same thing
> happens when I use a query I have constructed myself. Printing the query
> is fine in either case: it shows
> Text:books Text:"noam chomsky" Text:about Text:politics
> Also, doing the query without the quotes works properly, so it isn't a
> problem with the index or the way I use the query parser.
>
> So far as I can tell, the exception arises in PhraseQuery.scorer, at the
> line which says
> TermPositions p = reader.termPositions((Term)terms.elementAt(i));
> I'm using lucene 1.2 rc3.
>
> Any ideas?
>

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