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

add a $inOrder operator to $project

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Query Execution

      currently range tests need to be written like this:

              {
                      "$project" : {
                              "in_range" : {
                                      "$and" : [
                                              {
                                                      "$gt" : [
                                                              "$count",
                                                              10
                                                      ]
                                              },
                                              {
                                                      "$lt" : [
                                                              "$count",
                                                              100
                                                      ]
                                              }
                                      ]
                              },
                              "count" : 1
                      }
              }
      

      It would be nice to write this as {'in_range': {$inOrder:[10, '$count', 100]}}

      Naming is to be more clear when there are >3 arguments.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: