: In https://issues.apache.org/jira/browse/SOLR-1297, : Grant writes: : """ : Note, there is a temporary workaround for this: (main query)^0 : func(...) : """ : : Is that workaround an option for my use case?
that would in fact be a workarround for sorting by function where the function uses "ms" to get hte milliseconds of a rounded date field -- however... : > I am using 1.4.1, the date field is configured like this: : > <fieldType name="date" class="solr.DateField" sortMissingLast="true" : > omitNorms="true"/> : > : > (The schema has been created using the schema file from 1.4.0, and I : > haven't changed anything when upgrading to 1.4.1. TrieDate is said to be : > the default in 1.4, so I would expect this date field to have that : > type?) ...somewhere you got confused, or missunderstood something. There is no "default" date field in Solr, there are only recomendations and examples provided in the example schema.xml -- in Solr 1.4.1 *and* in Solr 1.4 the recommended field for dealing with dates is "solr.TrieDateField" As noted in the FunctionQuery wiki page you mentioned, the ms() function does not work with "solr.DateField". (most likely your schema.xml originally started from the example in SOlr 1.3 or earlier ... *OR* ... you needed the sortMissingLast/sortMissingFirst functionality that DateField supports but TrieDateField does not. the 1.4 example schema.xml explains the differences) -Hoss