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

Comment on: "manual/reference/operator/query/elemMatch.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None

    Description

      The results for
      db.survey.find(
      { results: { $elemMatch: { product: "xyz", score:

      { $gte: 8 }

      } } }
      )

      seems wrong.

      Instead of :
      { "_id" : 3, "results" : [

      { "product" : "abc", "score" : 7 }

      ,

      { "product" : "xyz", "score" : 8 }

      ] }

      , shouldn't it be:
      { "_id" : 3, "results" : [

      { "product" : "xyz", "score" : 8 }

      ] }

      ?

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 29 weeks, 2 days ago