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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 2.5.3
    • Affects Version/s: None
    • Component/s: Write Ops
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

                Created:
                Updated:
                Resolved: