Hi Hoss, > ...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" >
The idea of a default date type came while reading this on http://wiki.apache.org/solr/FunctionQuery: """ Arguments may be numerically indexed date fields such as TrieDate (the default in 1.4), or date math (examples in SolrQuerySyntax) based on a constant date or NOW. """ And now that I revisited that sentence, I see that it answers my question on whether I can use date math in those queries. Sorry for not reading more thoroughly... > 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) Actually, right now, I don't need sortMissingLast because the date is required for all documents. It is good that you mention it, though. I will keep it in mind when considering changing a field to TrieDate. Thanks! Chantal