Results from searching gems are not ordered by downloads #432

Closed
janko-m opened this Issue May 31, 2012 · 10 comments

Projects

None yet

3 participants

@janko-m
Contributor
janko-m commented May 31, 2012

I noticed that the results from searching gems are not ordered by the number of downloads. But when I read the source code (app/models/rubygem.rb), there it looks like they were supposed to be sorted by downloads. So I was just wondering if it's a bug with some database caching or something.

The below screenshot is when searching for "flickr", page 2. You can see that omniauth-flickr, for example, has more than 3000 downloads, and it's already half-a-year old gem.

flickr page 2

@plribeiro3000

+1 here. I also noticed that. Looked at the code too. I think that must be a cache problem or something like that.

@sferik sferik closed this in 582210d Nov 12, 2012
@plribeiro3000

So what, will this task run every day by a cron job? Or has to be called by hand?

@janko-m
Contributor
janko-m commented Nov 12, 2012

I guess they'll put it in a cron job.

@sferik
Member
sferik commented Nov 12, 2012

Yeah, @evanphx or @tcopeland should be able to take care of that. Once a day should be sufficient, right? Any idea what kind of load running this against the production dataset will put on the database? If it's significant we might need to run it less frequently.

@sferik
Member
sferik commented Nov 17, 2012

I deployed this code and ran this script for the first time. It took about 10 minutes to complete. The search results for "flickr" now look like this:

@janko-m
Contributor
janko-m commented Nov 17, 2012

Awesome! Thank you! :)

@sferik
Member
sferik commented Nov 17, 2012

Thanks for the patch. I added it to the weekly cron jobs in 95b9671. I don't think it needs to run any more frequently than that.

@janko-m
Contributor
janko-m commented Nov 17, 2012

Yes, I also wanted to say that it really isn't necessary for it to be run every day. Once a week is great :)

@plribeiro3000

Hey, and how is this task running? Its been some time it since the last time i think. =x

@janko-m
Contributor
janko-m commented Feb 4, 2013

Yes, I noticed that also. Is it a too big burden on the database?

On Sun, Feb 3, 2013 at 10:26 PM, Paulo Henrique Lopes Ribeiro <
notifications@github.com> wrote:

Hey, and how is this task running? Its been some time it since the last
time i think. =x


Reply to this email directly or view it on GitHubhttps://github.com/rubygems/rubygems.org/issues/432#issuecomment-13054833.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment