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

mongoimport doesn't support $maxKey and $minKey extended JSON

    • ALL
    • Hide
      > mongoimport -d test -c test mongoimport.txt
      
      Show
      > mongoimport -d test -c test mongoimport.txt
    • Server 2.7.3

      When importing the following file using mongoimport:

      { _id : 1, x : { $maxKey : 1 } }
      { _id : 2, x : { $minKey : 1 } }
      

      mongoimport does not appear to be processing the $maxKey and $minKey extended JSON syntax correctly.

      It's hard to tell using the shell:

      > db.test.find()
      { "_id" : 1, "x" : { "$maxKey" : 1 } }
      { "_id" : 2, "x" : { "$minKey" : 1 } }
      >
      

      but the x values are actually nested documents, and not MaxKey and MinKey respectively.

        1. mongoimport.txt
          0.1 kB
          Robert Stam

            Assignee:
            sverch Shaun Verch
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: