-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCSP-39699: Bulk writes #83
Conversation
✅ Deploy Preview for docs-java-rs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM w/ one small change
source/write/bulk-writes.txt
Outdated
~~~~~~~~~~~~~~~~~~ | ||
|
||
A replace operation removes all fields and values of a specified document, aside from | ||
the ``_id field``, and replaces them with new ones. To perform a replace operation, create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ``_id field``, and replaces them with new ones. To perform a replace operation, create | |
the ``_id`` field, and replaces them with new ones. To perform a replace operation, create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit and one question.
|
||
BulkWriteResult bulkResult = Mono.from(bulkWritePublisher).block(); | ||
|
||
System.out.printf(bulkResult.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Use System.out.println
instead of printf
Replace all instances.
// start-bulk-replace-one | ||
ReplaceOneModel<Document> operation = new ReplaceOneModel<>( | ||
eq("restaurant_id", "1234"), | ||
new Document("name", "Mongo's Pizza")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example seems a little artificial, as it replaces the whole document you'd lose the restaurant_id
is that desired?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will tweak the example to something in line with the example in the server manual.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Continuing off this unfinished PR opened by Angela, whose internship has since ended. Recreated the PR to get it working with the staging site autobuilder.
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-39699
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/java-rs/DOCSP-39699-bulk-write-2/write/bulk-writes/
Self-Review Checklist