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

Comment on: "manual/reference/method/cursor.sort.txt"

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • manual

    Description

      I have imported the zips.json from mongodb documentation and then ran this query

      db.zips.find().sort(

      {city:1}

      );

      As you notice, the city field is getting replaced with numbers in the result set. What is wrong with this query ?

      { "_id" : "02821", "city" : "02821", "loc" : [ -71.780767, 41.626721 ], "pop" : 246, "state" : "RI" } { "_id" : "04465", "city" : "04465", "loc" : [ -67.844536, 45.951196 ], "pop" : 421, "state" : "ME" }

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 38 weeks, 1 day ago