Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2491

Clarify "upserted items" in javadoc for BulkWriteResult.getUpserts()

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Documentation
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The javadoc for BulkWriteResult.getUpserts() says
      > Gets an unmodifiable list of *upserted* items, or the empty list if there were none.

      Arguably, "upserted items" is a bit ambiguous as a user might expect that to be populated when there's an update. The mongo shell documentation for https://docs.mongodb.com/manual/reference/method/BulkWriteResult/#BulkWriteResult.upserted is a little more specific, as it states:
      > An array of documents that contains information for each document *inserted* through operations with the Bulk.find.upsert() option.

            Assignee:
            Unassigned Unassigned
            Reporter:
            mark.helmstetter@mongodb.com Mark Helmstetter
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: