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

mongoexport doesn't support specifying fields within arrays in the field selector

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.5
    • Affects Version/s: 1.6.3
    • Component/s: Tools
    • None
    • Environment:
      Linux, 32-bit version
    • Fully Compatible
    • ALL

      Specifying a field selector that contains fields within arrays when calling the mongoexport utility has unexpected behaviour, at least when exporting to CSV.
      E.g. You have the following document in your db:

      {"id_": "username1",
      "telephones":
      [

      {"type": "mobile", "value":101010}

      ,

      {"type": "landline", "value": 202020}

      ]
      }

      Running the following doesn't return the expected results:

      mongoexport --csv -f '_id,telephones[0].value,telephones[1].value'

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            raulvk raulvk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: