• Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.7
    • Component/s: Querying
    • None

      It would be great if collection.find() can support piped query like aggregation.

      Let me explain this in a scenario below.

      In a customer support team, if a customer's issue has been handled by an engineer before, it's desired that the same engineer should handle new issue raised by this customer.

      Currently, to achieve this, I'd have to do two queries:
      1. For a given engineer's ID, find customers he has supported before.
      2. Find new issues raised by customers found in query 1.

      This is technically possible but have drawbacks:
      1. Two DB queries have to be done, instead of one.
      2. Customer information isn't really required by application but it has to be transmitted over network back and forth.
      3. If there're too many customers returned by query one, passing them back to MongoDB as parameter can potentially crash MongoDB.

      If a piped query is supported, then customer information can be produced and consumed within MongoDB internally. It should be more optimal in term of performance and client side coding.

            Assignee:
            Unassigned Unassigned
            Reporter:
            xuguoming@nexlabs.com Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: