Aggregation Query to have all the records (How to overcome 20 record limit)

Hi Folks!

I am using aggregation query, it gives 20records at once and then we have to iterate it. how should i get all the records at once and store it in any text file. I am unable to use $out here as not looking to store data in collection.

Also how the aggregation query could run from outside shell like we do simple queries with eval.

Thanks in Advance

Take a look at mongoexport. You might be able to do what you want.

1 Like

Hi @steevej

Thanks for response, but mongoexort don’t work for complex queries aggregation.

One idea is to create a view with your complex aggregation and the use mongoexport on that view.

1 Like