Skip to content
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

MongoDB sorting limitation #25

Closed
ChrisAlderson opened this issue Mar 22, 2016 · 1 comment
Closed

MongoDB sorting limitation #25

ChrisAlderson opened this issue Mar 22, 2016 · 1 comment

Comments

@ChrisAlderson
Copy link
Member

MongoDB v3.2 has a sorting limit for 32MB (as documented here). This does become an issue with sorting on 'updated'. There is a fix for this issue for the other sorting options (name, rating, trending, year), this involves 'aggregation'.
Sadly I have not found a way to apply this fix to the 'updated' sorting option as it sorts on a key-value pair which is inside of an array as you can see here. I did try to overcome this by using the 'unwind' and 'group' opperators, but without success.

@Richter-gh
Copy link

Richter-gh commented Apr 20, 2016

I deleted my comment because I thought I was wrong, but now I think an index based on unixtime of the updated date is the way to go.

ChrisAlderson pushed a commit that referenced this issue Jul 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants