Page MenuHomePhabricator

DBQ-95 nth article in a wiki
Closed, ResolvedPublic

Description

This issue was converted from https://jira.toolserver.org/browse/DBQ-95.
Summary: nth article in a wiki
Issue type: Task - A task that needs to be done.
Priority: Major
Status: Done
Assignee: DaB. <dab@ts.wikimedia.org>


From: Amir Sarabadani <ladsgroup@gmail.com>

Date: Tue, 06 Jul 2010 23:54:55

Hello,
I want to know which article is nth(e.g. 10000th) article in a wiki.but I can't write the SQL query(I don't know number of article are saved in what varible )
Would you mind writing the SQL Query?
Thanks


Version: unspecified
Severity: major

Details

Reference
bz59347

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:24 AM
bzimport set Reference to bz59347.

From: DaB. <dab@ts.wikimedia.org>

Date: Wed, 07 Jul 2010 15:24:28

Do you know, that it is not possible to get the "nth article" of a wiki, but only the "nth article today" (because of deleting and restoring)?


From: Amir Sarabadani <ladsgroup@gmail.com>

Date: Thu, 08 Jul 2010 07:13:18

no, I wanna know what is 100000th and 90000th article in Persian wikipedia.but I think we can create list article and sort it by page_id


From: EdoDodo <dodo.wikipedia@gmail.com>

Date: Thu, 08 Jul 2010 10:50:43

It is possible to check which page matches a page ID by using the API, with this format:
http://en.wikipedia.org/w/api.php?action=query&pageids=<pageidhere>

With that said, I don't think these ids are reliable as far as chronology is concerned - as DaB mentioned there is no way of knowing what the nth article created was, that I know of (except having a bot go through every page and look for the date of the first edit, but that would use up far too many system resources and take far too long to be feasible).


From: Krinkle <krinklemail@gmail.com>

Date: Thu, 22 Jul 2010 01:31:18

I'm just getting into this but perhaps it's possible to sort all pages on timestamp of the first revision. Then the nth of that


From: Amir Sarabadani <ladsgroup@gmail.com>

Date: Thu, 22 Jul 2010 16:52:03

I think so but I can't write this query


From: Krinkle <krinklemail@gmail.com>

Date: Fri, 13 Aug 2010 14:26:36

I've done something like this for nl.wikipedia.org. Is this perhaps what you're looking for ?

http://meta.wikimedia.org/wiki/User:Krinkle/Queries/nlwiki_ntharticles

It takes the nth article from the pages table. This will only count currently existing articles in the main (article) namespace that are not redirects, sorted by pageid.


From: Krinkle <krinklemail@gmail.com>

Date: Fri, 13 Aug 2010 14:33:07

A more elaborate script can be found here:

http://meta.wikimedia.org/wiki/User:Krinkle/Queries/nlwiki_ntharticles_more#footer

Shows a little extra information about when and by whom the article was created.

This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: wikimedia-bugzilla@dabpunkt.eu
CC list: dodo.wikipedia@gmail.com, krinklemail@gmail.com, wikimedia-bugzilla@dabpunkt.eu, ladsgroup@gmail.com