Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9590

Update $push + $sort should be able to sort by the whole array element

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.5.3
    • None
    • Write Ops

    Description

      I am suggesting a way to sort by the elements not just some part of them ({$sort:{"field":order}}).

      One possible syntax would be:

      {$push:{$each:[...], $sort:-1}}// sort whole element, desc.

      Attachments

        Activity

          People

            scotthernandez Scott Hernandez (Inactive)
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: