[Bug 2170] Random page in this category feature

2013-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

ShoeMaker technical...@yahoo.com changed:

   What|Removed |Added

 CC||technical...@yahoo.com

--- Comment #22 from ShoeMaker technical...@yahoo.com ---
Either there is no documentation for this fix or the fix was never reinstated
after it was reverted. 
http://www.mediawiki.org/wiki/Help_talk:Random_page/Archive_1  It is being
asked for by others, and now I've found need of something like this myself on
en.wikipedia.  There is a banner for Today's Article For Improvement that is
currently populated using a bot and a lot of template style pages with less
than optimal code that could greatly be simplified if I could use a
[[:Special:Random/Category:This_weeks_TAFIs]] to pick a random article from a
category for the week. The only extra that I would ask is that the page would
be picked on page load instead of clicking on the link so that the link when
using the piping trick would show the name of the article it was going to
take you to.  Can this be done?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2013-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

--- Comment #23 from Technical 13 technical...@yahoo.com ---
(In reply to comment #22)
 Either there is no documentation for this fix or the fix was never reinstated
 after it was reverted.
 http://www.mediawiki.org/wiki/Help_talk:Random_page/Archive_1  It is being
 asked for by others, and now I've found need of something like this myself on
 en.wikipedia.  There is a banner for Today's Article For Improvement that is
 currently populated using a bot and a lot of template style pages with less
 than optimal code that could greatly be simplified if I could use a
 [[:Special:Random/Category:This_weeks_TAFIs]] to pick a random article from a
 category for the week. The only extra that I would ask is that the page
 would be picked on page load instead of clicking on the link so that the link
 when using the piping trick would show the name of the article it was going
 to take you to.  Can this be done?

http://en.wikipedia.org/wiki/Wikipedia_talk:Today%27s_articles_for_improvement#Teahouse_TAFI_banner
is the link to the full discussion for using this feature.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2013-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

Legoktm legoktm.wikipe...@gmail.com changed:

   What|Removed |Added

 CC||legoktm.wikipe...@gmail.com

--- Comment #24 from Legoktm legoktm.wikipe...@gmail.com ---
(In reply to comment #22)
 Either there is no documentation for this fix or the fix was never reinstated
 after it was reverted. 

No, the extension in comment 20 was simply never deployed to WMF sites.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2013-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

--- Comment #25 from Technical 13 technical...@yahoo.com ---
(In reply to comment #24)
 (In reply to comment #22)
  Either there is no documentation for this fix or the fix was never 
  reinstated
  after it was reverted. 
 
 No, the extension in comment 20 was simply never deployed to WMF sites.

Can this bug be re-opened since there was no actual implemented fix?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2013-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

--- Comment #26 from Legoktm legoktm.wikipe...@gmail.com ---
(In reply to comment #25)

 Can this bug be re-opened since there was no actual implemented fix?

No, this bug (implementing such a feature in MediaWiki) is fixed. If you want
it deployed on enwiki or another WMF site, file a new bug under the Wikimedia
category.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2010-11-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

Alexandre Emsenhuber [IAlex] ialex.w...@gmail.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||ialex.w...@gmail.com
 Resolution||DUPLICATE

--- Comment #19 from Alexandre Emsenhuber [IAlex] ialex.w...@gmail.com 
2010-11-07 13:56:56 UTC ---


*** This bug has been marked as a duplicate of bug 15824 ***

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2010-11-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

Platonides platoni...@gmail.com changed:

   What|Removed |Added

 Resolution|DUPLICATE   |FIXED

--- Comment #20 from Platonides platoni...@gmail.com 2010-11-07 15:13:49 UTC 
---
Reason to close bug 15824 was the existance of
http://www.mediawiki.org/wiki/Extension:RandomInCategory

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2010-11-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

Platonides platoni...@gmail.com changed:

   What|Removed |Added

 CC||church.of.emacs...@gmail.co
   ||m

--- Comment #21 from Platonides platoni...@gmail.com 2010-11-07 15:14:45 UTC 
---
*** Bug 15824 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2010-04-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

Platonides platoni...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #15 from Platonides platoni...@gmail.com 2010-04-15 11:09:13 UTC 
---
Vasiliev implementation was reverted on r27436.

However, I don't think we can make it faster without adding a category_random,
it seems quite good:

EXPLAIN SELECT page_namespace, page_title FROM page USE INDEX(page_random) JOIN
categorylinks ON page_id = cl_from WHERE page_is_redirect = 0 AND page_random
= 0.15564 AND cl_to = 'GFDL' ORDER BY page_random LIMIT 1;

Both select_types SIMPLE:
+-+--+-+-++
|table|type  |key| key_len |ref  | Extra  |
+-+--+---+-+-++
|page |range |page_random|   8 |NULL |Using where |
|categorylinks|eq_ref|cl_from| 261 |page_id,const|Using where; Using index|
+-+--+---+-+-++

It would change to Using temporary; Using filesort if we weren't using a LIMIT,
but that's not the case.
Accessing the pages on the category is O(1), the problem is that for all the
results it needs to go to page to see the page_random. And for large categories
that would be a worse case of checking thousands of entries.
My testing shows that in practise it is run in a fraction of second, probably
due to the index + random numbers uniformly distributed.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2010-04-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

--- Comment #16 from Aryeh Gregor simetrical+wikib...@gmail.com 2010-04-15 
15:08:36 UTC ---
AFAICT, that will have to scan the entire page_random index in the worst case,
e.g., if there are no actual pages in the category.  You left out part of the
EXPLAIN -- this is full thing for me on enwiki (on toolserver).

*** 1. row ***
   id: 1
  select_type: SIMPLE
table: page
 type: range
possible_keys: page_random
  key: page_random
  key_len: 8
  ref: NULL
 rows: 10001064
Extra: Using where
*** 2. row ***
   id: 1
  select_type: SIMPLE
table: categorylinks
 type: eq_ref
possible_keys: cl_from,cl_timestamp,cl_sortkey
  key: cl_from
  key_len: 261
  ref: enwiki.page.page_id,const
 rows: 1
Extra: Using where; Using index

Note rows: 10001064.  Try running that on a large database with 'GFDL' replaced
by 'Nonexistent category' and you'll see it takes forever.  It's O(N) in number
of pages in the worst case, only acceptable for very small sites.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2010-04-15 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

--- Comment #18 from Aryeh Gregor simetrical+wikib...@gmail.com 2010-04-16 
00:01:53 UTC ---
If it checks category first, it can't use the page_random index, so it's O(N
log N) in the size of the category to sort its contents.  You may as well skip
the page table join and ORDER BY RAND() in that case.

I don't think it would have been trivial for MySQL to implement efficient pick
a random row without some kind of special index.  In any event, they don't, so
we need cl_random if we really want this enough.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2010-04-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170

Happy-melon happy-me...@live.com changed:

   What|Removed |Added

 CC||fe...@gmx.de

--- Comment #14 from Happy-melon happy-me...@live.com 2010-04-13 11:57:22 UTC 
---
*** Bug 23181 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2009-09-10 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170


Greg Ubben gregub...@comcast.net changed:

   What|Removed |Added

 CC||gregub...@comcast.net




--- Comment #13 from Greg Ubben gregub...@comcast.net  2009-09-11 05:59:24 
UTC ---
This new user script also works well for this:
* http://en.wikipedia.org/wiki/User_talk:GregU/randomlink.js


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2170] Random page in this category feature

2009-01-26 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2170


Melancholie wiki.melancho...@web.de changed:

   What|Removed |Added

 CC||wiki.melancho...@web.de




--- Comment #12 from Melancholie wiki.melancho...@web.de  2009-01-27 00:32:39 
UTC ---
As this is not fixed for Wikimedia wiki, a nice toolserver link:
* http://toolserver.org/~erwin85/randomarticle.php


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l