Thank you, Hoss... > -----Original Message----- > From: Chris Hostetter [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 08, 2007 8:41 PM > To: solr-user@lucene.apache.org; [EMAIL PROTECTED] > Subject: Re: sorting problem > > > : My query tries to search all entries which their ctype is video sorted > by > : tstamp descending and then sorted by popularity: > > : However the results returned are sorted only by the tstamp. > > > Solr stores datefields with millisecond precision, so if you index a date > field without rounding, then all of htat precision is going to be there > when it comes time to sort ... you can clearly see in your output that the > results are strictly sorted by your first critera .. the secondary sort > will only come into play if two docs have *exactly* the same value for the > tstamp field. > > assuming you generate your tstamp field using the "NOW" default in your > schema.xml, you can get rounding by using the DateMath feature, something > like this... > > <field name="timestamp" type="date" default="NOW/MINUTE" /> > > ...but if you are generating the tstamp field values in your client and > then sending them to Solr, you'll need to do the rounding there. > > -Hoss