0

有两个文件

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 请求的参数时。但它似乎不起作用。

4

1 回答 1

0

恐怕暂时不支持对嵌入文档字段进行排序。

于 2014-04-29T08:07:57.900 回答