https://bugzilla.wikimedia.org/show_bug.cgi?id=25931

--- Comment #38 from Bawolff (Brian Wolff) <[email protected]> ---
(In reply to comment #37)
> Change 71997 had a related patch set uploaded by Brian Wolff:
> Add Special:RandomInCategory.
> 
> https://gerrit.wikimedia.org/r/71997

I had an idea for an efficient method that doesn't need a schema change. It
however gives quite biased results in some cases (You can have 2 of cheap [in
the amount of ops work needed for a schema], fast and good. This one is cheap
and fast).

I think this is good enough for the common use case of people just wanting an
entry from a category that is different from last time they hit the random
button. (For example to get a random thing out of articles for cleanup or
whatever). To do something better would need a schema change, or some other
more exotic solution. I think this method could be "good" enough for now.
----

Algorithm is:
*Get earliest and newest cl_timestamp in a category
*Pick a date in between
*Pick an offset between 0 and 30
*Get the page that is offset number of pages after the date picked.

Thoughts?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to