Tag: cloudant

如何在cloudant查询中对日期进行排序

我想在本地cloudant查询中将我的数据排序为par desc date。 我在我的数据库文档中有insert_ts。 我的简单查询代码是: – public List allTasksWithAllArg(Map query, int skip, int limit, List fields, List<Map> sortDocument) { int nDocs = this.sunDatastore.getDocumentCount(); QueryResult all = this.im.find(query, skip, limit, fields, sortDocument); List arrayListBasicDocumentMAP = new ArrayList(); // Filter all documents down to those of type Task. for (DocumentRevision rev : all) { }} 请帮我按日期排序数据。 谢谢