Hi,

I recently tried upgrading our setup from 4.5.1 to 4.7+, and I'm
seeing an exception when I use (1) a function to sort and (2) result
grouping.  The same query works fine with either (1) or (2) alone.
Example below.

At a glance, it looks similar to:
https://issues.apache.org/jira/browse/SOLR-5920

I don't think it's our schema, but I'm happy to further isolate if
it's not obvious.

Thanks,

Nate

Example (v4.8.1):
{
  "responseHeader": {
    "status": 500,
    "QTime": 14,
    "params": {
      "sort": "sum(1,1) desc",
      "indent": "true",
      "q": "title:solr",
      "_": "1403586036335",
      "group.field": "type",
      "group": "true",
      "wt": "json"
    }
  },
  "error": {
    "msg": "java.lang.Double cannot be cast to org.apache.lucene.util.BytesRef",
    "trace": 
"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:
java.lang.Double cannot be cast to org.apache.lucene.util.BytesRef
    "code": 500
  }
}

>From the log:

org.apache.solr.common.SolrException;
null:java.lang.ClassCastException: java.lang.Double cannot be cast to
org.apache.lucene.util.BytesRef
        at 
org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981)
        at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176)
        at 
org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125)
        at 
org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65)
        at 
org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43)
        at 
org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193)


--

Nate Dire
Software Engineer
http://www.highspot.com

Reply via email to