Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1866

Mongoimport upsert and merge should offer the ability to update multiple documents

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: mongoimport
    • Labels:
      None

      Mongoimport allows for updating documents based on the input file. The --upsertFields option is available which modifies how documents are matched to the documents in the input file.

      The documentation states:
      --upsertFields - specifies a list of fields for the query portion of the upsert. Use this option if the _id fields in the existing documents don't match the field in the document, but another field or field combination can uniquely identify documents as a basis for performing upsert operations.

      There are cases where it would be beneficial for upserts and merges to modify multiple documents in the collection. Would it be possible to add an option to instruct mongoimport to update all documents that match based on the upsertFields criteria?

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            arnie.listhaus@mongodb.com Arnie Listhaus
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: