Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2643

Add direct comparison of $ vs $elemMatch usage

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • v1.3.11
    • None
    • manual
    • None

    Description

      The differences between the $ projection operator and $elemMatch projection operator could be better explained.

      We do mention the array field limitation for $, but in the $elemMatch notes it just says "The $elemMatch projection operator is similar to the positional $ projection operator".

      To further confuse things, the $elemMatch operator can be used in queries and the $ can be used in updates.

      Perhaps we can do some sort of direct comparison table/summary?

      Possible starting point: http://stackoverflow.com/questions/21519185/projection-vs-elemmatch

      Attachments

        Activity

          People

            andrew.aldridge@mongodb.com Andrew Aldridge
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 22 weeks, 5 days ago