0

There are two documents

product : {
   name : string,
   price : integer
}

score : {
   product_id : {
        'type': 'objectid',
        'required': True,
        'data_relation' : {
            'resource': 'product ',
            'field': '_id',
            'embeddable': True
        },

   region : string,
   score : integer,
}

I need to get all the scores of a certain region sorted by product price.

when I use ?embedded={"product_id":1}&sort=[("product_id.price", -1)] as the parameter of GET request. But it seems doesn't work.

  • Your question is not clear. What framework are you using for exposing these documents to http requests? – joemar.ct Apr 29 '14 at 06:33
  • the `eve` tag hints at the framework he's referring to, although I agree that the question should probably be updated to make it explicit. – Nicola Iarocci Apr 29 '14 at 08:09

1 Answers1

0

I'm afraid that sorting on embedded document fields is not supported at the time being.

Nicola Iarocci
  • 6,606
  • 1
  • 20
  • 33