ruby - Mongoid querys memory limit -


i have around 1 million records in database. when do:

mymodel.distinct(:my_field)  

getting error -

failed error 17217: "exception: distinct big, 16mb cap" 

tried via aggregation - getting same error.

group = {"$group" => {"_id" => {"my_field" => "$my_field"}}} mymodel.collection.aggregate(group)  failed error 16389: "exception: aggregation result exceeds maximum document size (16mb)" 

is there way in mongoid increase memory limit 16mb 100mb? or other ways of getting distinct results? or how manage large queries mongoid?


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -