【发布时间】:2014-04-29 05:05:08
【问题描述】:
有两个文件
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 请求的参数时。但是好像不行。
【问题讨论】:
-
你的问题不清楚。您使用什么框架将这些文档公开给 http 请求?
-
eve标签暗示了他所指的框架,尽管我同意这个问题可能应该更新以使其明确。