Page MenuHomePhabricator

list=exturlusage does not show all links if there are someone with an empty el_index in db externallinks
Closed, DeclinedPublic

Description

http://en.wikipedia.org/w/api.php?action=query&list=exturlusage&euquery=www.cia.gov/cia/publications/factbook/geos&eunamespace=10&euprotocol=https does not show all links as expected. e.g. http://en.wikipedia.org/w/api.php?action=query&prop=extlinks&titles=Template:Economy_of_Austria_table contains that a link that should match.
I think its because ApiQueryExtLinksUsage uses el_index to find these links. But as i can see on toolserverdb, in the missing cases el_index on db externallinks is empty. I think el_to should be used in the query instead.

sql query to show the missing result on enwiki_p: select page_namespace, page_title, e.* from page p inner join externallinks e on p.page_id = e.el_from where el_to like 'https://www.cia.gov/cia/publications/factbook/geos%' and page_namespace=10;


Version: unspecified
Severity: major
URL: http://en.wikipedia.org/w/api.php?action=query&list=exturlusage&euquery=www.cia.gov/cia/publications/factbook/geos&eunamespace=10&euprotocol=https

Details

Reference
bz19083

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:42 PM
bzimport set Reference to bz19083.

Closing this as WONTFIX.

The query needs to use the el_index field in order to be remotely efficient; using el_to is not an option. Also, the real bug here is that the database is corrupt: empty el_index fields simply shouldn't happen, the fact that they do is a separate bug.