lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Bodner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1048) Ids parameter and fl=score throws an exception for wt=json
Date Sun, 05 Dec 2010 22:12:12 GMT

    [ https://issues.apache.org/jira/browse/SOLR-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967035#action_12967035
] 

Jon Bodner commented on SOLR-1048:
----------------------------------

The issue is still present in the 1.4.1 code base for Solr.  I found the source of the problem.
 In the ids stage for sharding, the score is not calculated (it was returned in the previous
stage), so the DocSlice's scores float array is still null.  XMLWriter and BinaryResponseWriter
include lines like:

        includeScore = includeScore && ids.hasScores();

but JSONWriter does not. 

This issue is only going to present itself when you are debugging, since I think the ids parameter
is only used for sharding, and Solr uses the javabin wire protocol instead of json.


> Ids parameter and fl=score throws an exception for wt=json
> ----------------------------------------------------------
>
>                 Key: SOLR-1048
>                 URL: https://issues.apache.org/jira/browse/SOLR-1048
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Laurent Chavet
>
> http://yourHost:8080/solr/select/?ids=YourDocId&version=2.2&start=0&rows=10&indent=on&fl=score,id&q=%2B*:*
> shows that when using ids= the score for docs is null; when using wt=json:
> http://yourHost:8080/solr/select/?ids=YourDocId&version=2.2&start=0&rows=10&indent=on&fl=score,id&q=%2B*:*&wt=json
> that throws a NullPointerException:
> HTTP Status 500 - null java.lang.NullPointerException at org.apache.solr.search.DocSlice$1.score(DocSlice.java:120)
at org.apache.solr.request.JSONWriter.writeDocList(JSONResponseWriter.java:490) at org.apache.solr.request.TextResponseWriter.writeVal(TextResponseWriter.java:140)
at org.apache.solr.request.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:175)
at org.apache.solr.request.JSONWriter.writeNamedList(JSONResponseWriter.java:288) at org.apache.solr.request.JSONWriter.writeResponse(JSONResponseWriter.java:88)
at org.apache.solr.request.JSONResponseWriter.write(JSONResponseWriter.java:49) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:847)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619)

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message