[ https://issues.apache.org/jira/browse/SOLR-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613116#action_12613116 ]
ian connor commented on SOLR-626: --------------------------------- I am new to JIRA - how can I see/test this code change and let you know if it worked? I tried to "svn update" ... but I am not sure which file you changed: U CHANGES.txt U src/java/org/apache/solr/update/SolrIndexWriter.java U src/java/org/apache/solr/common/SolrDocument.java U src/java/org/apache/solr/core/SolrCore.java U src/java/org/apache/solr/util/SolrPluginUtils.java U src/webapp/web/admin/header.jsp U src/webapp/web/admin/form.jsp U src/webapp/web/admin/index.jsp U src/webapp/web/admin/analysis.jsp U client/java/solrj/src/org/apache/solr/client/solrj/SolrQuery.java It is just after this update the problem still happens for me. > docs.getMaxScore is null inside writeSolrDocumentList when sorting using > shards and returning output as JSON > ------------------------------------------------------------------------------------------------------------ > > Key: SOLR-626 > URL: https://issues.apache.org/jira/browse/SOLR-626 > Project: Solr > Issue Type: Bug > Components: search > Affects Versions: 1.3 > Environment: Tested on both Linux and OSX running latest 1.3 build > Reporter: ian connor > Fix For: 1.3 > > > When issuing a query to many shards or even just one: > http://localhost:8983/solr/select?sort=some_date+desc&indent=on&hl.fl=&q=solr&rows=10&fl=*%2Cscore&qt=standard&wt=ruby&explainOther=&hl.fl=&shards=localhost:8983/solr > It returns: > java.lang.NullPointerException > at > org.apache.solr.request.JSONWriter.writeSolrDocumentList(JSONResponseWriter.java:528) > at > org.apache.solr.request.TextResponseWriter.writeVal(TextResponseWriter.java:147) > 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.RubyResponseWriter.write(RubyResponseWriter.java:34) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:297) > at > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) > I tried to swap out the call to writeLong from: > writeFloat(null,docs.getMaxScore()); > to: > writeFloat(null,0); > and it then works without bringing back the max_score. However, I am not sure > why the score is coming back null here. If you return the results in XML it > also works so the problem seems limited to JSON and Ruby. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.