NPE throws in ShardDoc's ShardFieldSortedHitQueue when Distributed Searching
----------------------------------------------------------------------------
Key: SOLR-2147
URL: https://issues.apache.org/jira/browse/SOLR-2147
Project: Solr
Issue Type: Bug
Affects Versions: 4.0
Environment: JDK1.6/Tomcat6
Reporter: tom liu
when distributed searching use katta components(solr-1395), throws NPE:
Oct 9, 2010 5:43:59 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
at
org.apache.solr.handler.component.ShardFieldSortedHitQueue$1.compare(ShardDoc.java:210)
at
org.apache.solr.handler.component.ShardFieldSortedHitQueue.lessThan(ShardDoc.java:134)
at org.apache.lucene.util.PriorityQueue.upHeap(PriorityQueue.java:221)
at org.apache.lucene.util.PriorityQueue.add(PriorityQueue.java:130)
at
org.apache.lucene.util.PriorityQueue.insertWithOverflow(PriorityQueue.java:146)
at
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:555)
at
org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:408)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:304)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at
org.apache.solr.katta.SolrKattaServer.request(SolrKattaServer.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:959)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:955)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:953)
i found that sharddoc.java 210 was :
final float f1 = e1.score;
final float f2 = e2.score;
score field is Float type, it may be null. so should be changed as:
final float f1 = e1.score==null?0.00f:e1.score;
final float f2 = e2.score==null?0.00f:e2.score;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]