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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.3
    • Component/s: Write Ops
    • Labels:

      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

          Issue Links

            Activity

              People

              Assignee:
              scotthernandez Scott Hernandez
              Reporter:
              scotthernandez Scott Hernandez
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: