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
Aggregate support in mongodb 3.6 #148
Comments
Is there a trick to get around the problem? |
@johnoliver Any ideas? |
No ideas! Sorry, |
This is how I worked around the problem for now: 1.) add the cursor to your command using a batch size larger than your maximum number of results:
2.) find your results in the new location:
Hope this saves someone a couple of minutes. |
What is the status of this enhancement? |
I think this is resolved and will land in 3.6.1 |
Is it on Vert.x's roadmap a reactive implementation of aggregate method (e.g. rxAggregate)? |
mongodb 3.6 removes the possibility to call aggregate command without specifying a cursor.
https://docs.mongodb.com/manual/release-notes/3.4-compatibility/index.html#deprecated-operations
so the old and well proven trick from
https://vertx.io/docs/vertx-mongo-client/java/#_running_other_mongodb_commands
no longer works. The returned "result" array no longer exists, but instead a cursor document with a firstBatch array is returned. Sending the GET_MORE command to retrieve the next batch seems not to be possible.
It seems to me that using aggregation with mongo 3.6 require active support from the Vertx.x MongoDB Client, f.ex. with an aggregate(..) method that returns a ReadStream similar to findBatch
The text was updated successfully, but these errors were encountered: