使用新公司的FireStore,我有一个看起来像这样的结构:公司的FireStore排序依据(子集合)
{
...
"username": "mr_jones",
"date_created": 1508395138572,
"stats": {
"posts": 143,
...
},
...
}
根据该文件,我可以order and limit我的查询,以筛选基于一个where
数据条款。我如何根据stats.posts
订购这些数据?
即
usersRef.orderBy('stats.posts').limit(15);
'usersRef.orderBy('stats.post')。limit(15)'看起来对我来说很合适。当你尝试时会发生什么?你有错误吗? –
@MichaelLehenbauer我期待它很像一个mongoDb查询,但任何时候我使用一个属性时,它似乎对结果集没有任何影响 – Felipe