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

    XMLWordPrintable

    Details

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

      Description

      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?

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: