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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
________________________________________

  Ronnie Kolehmainen
  Systems Developer
  Electronic Publishing Centre
  Uppsala University Library
  +46 (0)18 471 5847
  mailto:[EMAIL PROTECTED]
________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to