Page MenuHomePhabricator

Namespace filter in Special:Linksearch
Closed, ResolvedPublic

Description

Author: wiki.bluefish

Description:
It would be nice if the output of Spezial:Linksearch can be filtered for the
different namespaces.

e.g. show only the article name space of
http://de.wikipedia.org/wiki/Spezial:Linksearch/%2A.dyndns.org


Version: unspecified
Severity: enhancement

Details

Reference
bz7804

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:28 PM
bzimport set Reference to bz7804.
bzimport added a subscriber: Unknown Object (MLST).

webboy wrote:

Adds a namespace selector to Special:Linksearch

Attached:

Hopefully this isn't an index problem; on very often-linked sites, picking a rarely appearing namespace
could require shuffling through the entire link set in the database.

Namespace filter added with r20144

(In reply to comment #1)

Created an attachment (id=2635) [edit]
Adds a namespace selector to Special:Linksearch

Have seen your patch too late. But it works similiar

(In reply to comment #2)

Hopefully this isn't an index problem; on very often-linked sites, picking a

rarely appearing namespace

could require shuffling through the entire link set in the database.

If you are unhappy with this implementation, please revert. Another not so
expensive (hopefully) solution is a simple filter main namespace and non main
namespace.

wiki.bluefish wrote:

thanks for adding the filter, but is has a bug. If you choose talk pages as
filter it shows only talk pages but if you click on "next 50" or "show 500" then
the parameter "namespace=x" is missing in the link.

(In reply to comment #4)

thanks for adding the filter, but is has a bug. If you choose talk pages as
filter it shows only talk pages but if you click on "next 50" or "show 500" then
the parameter "namespace=x" is missing in the link.

Fixed with r20159

  • Bug 8740 has been marked as a duplicate of this bug. ***

wiki.bluefish wrote:

(In reply to comment #5)

(In reply to comment #4)

thanks for adding the filter, but is has a bug. If you choose talk pages as
filter it shows only talk pages but if you click on "next 50" or "show 500" then
the parameter "namespace=x" is missing in the link.

Fixed with r20159

it isn't fixed. i can reproduce this behaviour. please fix. thx

It is fixed, but the Wikimedia servers are still on release r20145 (see
[[Special:Version]]. A bigger schema change is pending. Be patient please :-)

for the record, reverted, non-trivial optimization to make it happen.

wiki.bluefish wrote:

(In reply to comment #9)

for the record, reverted, non-trivial optimization to make it happen.

but in general it worked very fine. (i was already wondering why it since some
minutes don't work at all..)

Fixed with r21543, but due to MiserMode not available for WMF Wikis :-(

wiki.bluefish wrote:

so we have a namespace filter in Special:Contributions, in Special:Recentchanges
and in Special:Watchlist (and more?) but it is not possible in
Special:Linksearch? hardly understandable.

ayg wrote:

Presumably the appropriate table isn't currently indexed by namespace.

  • Bug 10058 has been marked as a duplicate of this bug. ***

le.korrigan wrote:

Shouldn't this bug be reopened ? This feature doesn't seem to be activated on WMF wikis so far.

ayg wrote:

See comment #11. The feature exists but has not been activated because it's inefficient due to the structure of the table: the table contains an article ID only, with no namespace stored.

I admit I don't see the inefficiency in the join:

mysql> EXPLAIN SELECT * FROM externallinks WHERE el_index LIKE 'http://com.disney%';
+----+-------------+---------------+-------+---------------+----------+---------+------+------+-------------+

idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra

+----+-------------+---------------+-------+---------------+----------+---------+------+------+-------------+

1SIMPLEexternallinksrangeel_indexel_index62NULL4Using where

+----+-------------+---------------+-------+---------------+----------+---------+------+------+-------------+
1 row in set (0.00 sec)

mysql> EXPLAIN SELECT * FROM externallinks JOIN page ON (el_from = page_id) WHERE page_namespace = 0 AND el_index LIKE 'http://com.disney%';
+----+-------------+---------------+--------+--------------------+----------+---------+------------------------------+------+-------------+

idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra

+----+-------------+---------------+--------+--------------------+----------+---------+------------------------------+------+-------------+

1SIMPLEexternallinksrangeel_from,el_indexel_index62NULL4Using where
1SIMPLEpageeq_refPRIMARY,name_titlePRIMARY4wikidb.externallinks.el_from1Using where

+----+-------------+---------------+--------+--------------------+----------+---------+------------------------------+------+-------------+
2 rows in set (0.00 sec)

But that's another bug. Feel free to open a new bug requesting that this feature be improved to be efficient enough for inclusion on Wikipedia.

le.korrigan wrote:

Thank you, this is now bug 10593.

  • Bug 11334 has been marked as a duplicate of this bug. ***
  • Bug 16341 has been marked as a duplicate of this bug. ***