1

我在重新思考数据库中进行查询,

r.db('main').table('log').distinct({index: 'number'}).between(r.epochTime((new Date).setHours(0, 0, 0, 0)/1000), r.epochTime((new Date).setHours(23, 59, 59, 99)/1000), {index: 'createdAt'}).count()

numbercreatedAt是两个二级索引。这样做会产生错误,因为我们不允许在单个查询中使用多个二级索引。我尝试使用此链接创建复合索引,但它与我的问题不同。提前致谢。

4

0 回答 0