Hi, I don't think that format is supported in new Date(dateString) (at least, not in Rhino), it evaluates to 0 for me.
B. On 28 May 2011 15:19, He Shiming <[email protected]> wrote: > Hi, > > I've been playing around with couchdb-lucene, and I noticed I can't > get date sort to work. My documents use dates in the format of: > 'updated_at': '2011-04-04T15:53:39Z'. And the index function of lucene > adds it this way: > > var ret = new Document(); > ... > ret.add(new Date(doc.updated_at), {'field': 'updated_at', 'type': 'date'}); > > When querying, I access > /_fti/_design/mydoc/by.name?q=my+query&sort=\updated_at<date> . The > results isn't sorted by date. 'sort_order' is > [{"field":"updated_at","reverse":true,"type":"long"}]. Note that the > slash and sort field got picked up, but <date> didn't. And for each > row, row['sort_order'] is [0]. > > Am I using it the wrong way? > > Thanks! > -- > Best regards, > He Shiming >
