有两个文件
product : {
name : string,
price : integer
}
score : {
product_id : {
'type': 'objectid',
'required': True,
'data_relation' : {
'resource': 'product ',
'field': '_id',
'embeddable': True
},
region : string,
score : integer,
}
我需要按产品价格排序某个地区的所有分数。
当我使用?embedded={"product_id":1}&sort=[("product_id.price", -1)]
作为GET请求的参数时。但似乎没有用。
答案 0 :(得分:0)
我担心目前不支持对嵌入式文档字段进行排序。