In looking at the code, I see: <code> try { short val = Short.parseShort(s); writer.writeShort(name, val); } catch (NumberFormatException e){ // can't parse - write out the contents as a string so nothing is lost and // clients don't get a parse error. writer.writeStr(name, s, true); } </code>
And it makes me wonder if you are hitting the NFE. Can you recreate this in a self-contained test? -Grant On Feb 5, 2010, at 4:10 AM, Marcus Herou wrote: > Hi. > > When using the field type solr.ShortField in combination with sharding we > get results like this back: > <str name="sentimentScore">java.lang.Short:40</str> > > Making it impossible to sort on that value. > Changing the field to IntegerField solves it. > > Example search: > > GET " > http://127.0.0.1:8110/solr/blogosphere-sv-2010Q1/select?q=(title:hej+OR+description:hej)+AND+(publishedDate:[2010-01-01T00:00:00.000Z+TO+2010-02-04T23:59:59.099Z])&rows=5&shards=127.0.0.1:8110/solr/blogosphere-sv-2010Q1,127.0.0.1:8110/solr/blogosphere-sv-2010Q1&indent=on&sort=sentimentScore+asc > " > > Cheers > > //Marcus Herou > > > -- > Marcus Herou CTO and co-founder Tailsweep AB > +46702561312 > marcus.he...@tailsweep.com > http://www.tailsweep.com/