couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From He Shiming <>
Subject couchdb-lucene trouble with date sorting
Date Sat, 28 May 2011 14:19:14 GMT

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/\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?

Best regards,
He Shiming

View raw message