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

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 2.5.3
    • 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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: