Robomongo: Aggregate only shows 50 results

Created on 12 Aug 2016  Â·  29Comments  Â·  Source: Studio3T/robomongo

When using an aggregate query in robomongo 0.9.0-RC9, only the top 50 results are shown. I can't seem to find another way to select the rest of the set. In robomongo 0.8.5, the result set was contained within an array, which was inside another object (which included the result set and status message/code), making the entire set searchable. This time the result set is just displayed as the result objects.

result in 0.8.5
image

result in 0.9-RC9
image

bug duplicate

Most helpful comment

thanks !
in fact I found an easier solution : just add the following line before the
request:

DBQuery.shellBatchSize = 500;

:)

thanks !

2017-11-17 13:24 GMT+01:00 Raphael Beer notifications@github.com:

Hi @davidm06 https://github.com/davidm06,
it's really simple. There is an $out stage, you'll have to apply at the
end; just as you would any other ($match, $project, ...) aggregation
stage:

var muhIdsOfInterest = ['123', '456', '78a'];db.getCollection('users').aggregate(
{ $match: { userId: { $in: muhIdsOfInterest } } },
{ $out: onlyUsersILike }
);

This gets all users that have a userId in muhIdsOfInterest and dumps
found Documents into a new Collection named onlyUsersILike.
NOTE: $out doesn't care about existing Collections and blatently
overwrites them with the new output. Not appending, overwriting.

Docs: https://docs.mongodb.com/manual/reference/operator/aggregation/out/

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Studio3T/robomongo/issues/1157#issuecomment-345230560,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD7Dh15UCCDH5bvOc4Kdg-nk8vFry2Ttks5s3Xr3gaJpZM4JjeO4
.

--
http://www.davidmarchioni.fr
Photographe

All 29 comments

@eddyhuber thanks for reporting! It's known issue and we're sorry for that! Issue'll be fixed it in the next releases. As a workaround please check the tips from the ticket #1058. Hope they will help you!
Also let me suggest you to track fixing progress with the same #1058 card. So I will close current ticket as duplicate if you don't mind.

Has this been resolved yet? or has the problem returned?

Experiencing the same thing..

Yeah they haven't fixed it; can confirm and reproduce on my end using multiple queries.

Is not yet fixed? OMG...

Yes WTF?

Why I'm still facing the same problem on 1.1.1?

You mean in 2017?

I'm using Robo 3T 1.1.1 for mac.
Is there newer version of this?

OK. Thanks.

I meant that why it's not fixed since it's reported a year ago.

Me too :) robomongo seems pretty outdated and not maintained since im using it for 2 years now and not much new features arrived

Ah, Thanks for letting me know.

As of the 0.9 release, results of a query are being returned as a cursor instead of just returning all documents. Otherwise one wouldn't be able to run larger queries. Not being able to iterate over the results makes this improvement insufficient. We will review this decision and - if needed - revert the change.

In the meantime, please use the $out stage to dump the results to a temp collection.

We will continue to use the ticket https://github.com/Studio3T/robomongo/issues/1058 for status updates on this report.

Problem is that there is even no cursor when I use aggregate as first guy asked.

Cursor still supports to retireve more than 50 documents could you please provide a select box for pagination?

What @azarus said!
I was actually quite surprised not to have them when using aggregates. find() results do offer those (input boxes 0/50 and blue arrows).
That said, @tomasznaumowicz 's solution with $out is good enough for me. Thanks :)

Hi all

I have the same issue. what is the solution with $out please ?

Hi @davidm06,
it's really simple. There is an $out stage, you'll have to apply at the end; just as you would any other ($match, $project, ...) aggregation stage:

var muhIdsOfInterest = ['123', '456', '78a'];
db.getCollection('users').aggregate(
  { $match: { userId: { $in: muhIdsOfInterest } } },
  { $out: 'onlyUsersILike' }
);

This gets all users that have a userId matching one in muhIdsOfInterest and dumps found Documents into a new Collection named onlyUsersILike.
NOTE: $out replaces existing Collections and overwrites them with the new output. Although it keeps indexes of the overwritten Collection. Refer to Replace Existing Collection in the docs!

Docs: https://docs.mongodb.com/manual/reference/operator/aggregation/out/

thanks !
in fact I found an easier solution : just add the following line before the
request:

DBQuery.shellBatchSize = 500;

:)

thanks !

2017-11-17 13:24 GMT+01:00 Raphael Beer notifications@github.com:

Hi @davidm06 https://github.com/davidm06,
it's really simple. There is an $out stage, you'll have to apply at the
end; just as you would any other ($match, $project, ...) aggregation
stage:

var muhIdsOfInterest = ['123', '456', '78a'];db.getCollection('users').aggregate(
{ $match: { userId: { $in: muhIdsOfInterest } } },
{ $out: onlyUsersILike }
);

This gets all users that have a userId in muhIdsOfInterest and dumps
found Documents into a new Collection named onlyUsersILike.
NOTE: $out doesn't care about existing Collections and blatently
overwrites them with the new output. Not appending, overwriting.

Docs: https://docs.mongodb.com/manual/reference/operator/aggregation/out/

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Studio3T/robomongo/issues/1157#issuecomment-345230560,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD7Dh15UCCDH5bvOc4Kdg-nk8vFry2Ttks5s3Xr3gaJpZM4JjeO4
.

--
http://www.davidmarchioni.fr
Photographe

thanks !! @davidm06~

@davidm06 I disliked your solution, it makes this issue a LOW PRIORITY one, and it will never get fixed. :)

I am still seeing this issue

still an issue

use toArray() at the end and you'll get the whole result at once

Still an issue :(

Thanks @oussama-kh / @davidm06 both worked for me.

Yep - I've just hit this too - toArray() worked well if I wanted the text-mode result format, but table mode worked best with the

DBQuery.shellBatchSize = 500;

And that needs to be a line prior to the aggregation being invoked.

thanks ! in fact I found an easier solution : just add the following line before the request: DBQuery.shellBatchSize = 500; :) thanks ! 2017-11-17 13:24 GMT+01:00 Raphael Beer notifications@github.com:
…
Hi @davidm06 https://github.com/davidm06, it's really simple. There is an $out stage, you'll have to apply at the end; just as you would any other ($match, $project, ...) aggregation stage: var muhIdsOfInterest = ['123', '456', '78a'];db.getCollection('users').aggregate( { $match: { userId: { $in: muhIdsOfInterest } } }, { $out: onlyUsersILike } ); This gets all users that have a userId in muhIdsOfInterest and dumps found Documents into a new Collection named onlyUsersILike. NOTE: $out doesn't care about existing Collections and blatently overwrites them with the new output. Not appending, overwriting. Docs: https://docs.mongodb.com/manual/reference/operator/aggregation/out/ — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1157 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AD7Dh15UCCDH5bvOc4Kdg-nk8vFry2Ttks5s3Xr3gaJpZM4JjeO4 .
-- http://www.davidmarchioni.fr Photographe

Thanks. It works for me.

use toArray() at the end and you'll get the whole result at once

This won't work if your object size exceeds limit of 16793600 bytes.

Was this page helpful?
0 / 5 - 0 ratings