lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Kolehmainen <ronnie.kolehmai...@ub.uu.se>
Subject Re: NullPointerException in ParallelMultiSearcher
Date Wed, 21 Dec 2005 07:59:24 GMT
I believe the most common case is when you do a search with Sort (AUTO 
feature), and one of the fields you sort by is empty. The underlying 
IndexSearcher throws a RuntimeException and "docs" (result from 
searcher.search()) is never set, which results in a NullPointerException 
when hits() is called later on after the searcher thread is joined.

I'm not sure if there are other scenarios where searcher.search() throws 
  exceptions other than IOException (which is handled by 
MultiSearcherThread). These will result in NullpointerExceptions as well.

Not much help I guess, but perhaps some more insight.

/Ronnie

Zhang, Lisheng wrote:
> Hi,
> 
> I have not received any feedback yet, any comments
> would be greatly appreciated!
> 
> Lisheng
> 
> -----Original Message-----
> From: Zhang, Lisheng 
> Sent: Thursday, December 01, 2005 12:30 PM
> To: 'java-user@lucene.apache.org'
> Subject: NullPointerException in ParallelMultiSearcher
> 
> 
> Hi,
> 
> We are using lucene v1.4.3 for some time, in general it is working well.
> 
> We often try to search multiple collections at the same time, so we 
> are using ParallelMultiSearcher, but sometimes we got the following
> exception:
> 
> ########
> java.lang.NullPointerException
>     at
> org.apache.lucene.search.MultiSearcherThread.hits(ParallelMultiSearcher.java
> :281)
>     at
> org.apache.lucene.search.ParallelMultiSearcher.search(ParallelMultiSearcher.
> java:134)
>     at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:64)
>     at org.apache.lucene.search.Hits.<init>(Hits.java:51)
>     at org.apache.lucene.search.Searcher.search(Searcher.java:41)
> ########
> 
> It seems this happens when searching site is heavily used, also when
> we switch to MultiSearcher, we never see this kind of problems?
> 
> Your guidance would be very appreciated!
> 
> Best regards, Lisheng
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 

-- 
________________________________________

   Ronnie Kolehmainen
   Systems Developer
   Electronic Publishing Centre
   Uppsala University Library
   +46 (0)18 471 5847
   mailto:ronnie.kolehmainen@ub.uu.se
________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message