lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Bodner (JIRA)" <>
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


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:
>             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$1.score(
at org.apache.solr.request.JSONWriter.writeDocList( at org.apache.solr.request.TextResponseWriter.writeVal(
at org.apache.solr.request.JSONWriter.writeNamedListAsMapWithDups(
at org.apache.solr.request.JSONWriter.writeNamedList( at org.apache.solr.request.JSONWriter.writeResponse(
at org.apache.solr.request.JSONResponseWriter.write( at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke( at
org.apache.catalina.core.StandardContextValve.invoke( at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service( at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at$ at

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:
For additional commands, e-mail:

View raw message