Last modified: 2014-09-30 19:15:24 UTC
As suggested by Simetrical on bug 7804, I'm opening a new bug to request the namespace filter to be activated for Special:Linksearch on Wikimedia wikis. As far as I understand, this feature needs to be more efficient to be activated (see comment #16 on bug 7804). Thanks.
The only way to make this efficient is to duplicate page namespace data into the link tables, which would be difficult at best to maintain.
I don't think that's something we want to do at the moment...
*** Bug 11754 has been marked as a duplicate of this bug. ***
*** Bug 14096 has been marked as a duplicate of this bug. ***
*** Bug 16948 has been marked as a duplicate of this bug. ***
*** Bug 19649 has been marked as a duplicate of this bug. ***
*** Bug 19789 has been marked as a duplicate of this bug. ***
Bah. So many dupes due to Bugzilla's crap default search. This isn't a LATER bug any longer. As I noted in bug 19789, the API can do this easily. The UI should match. Re-opening!
Is this a case where the web UI needs to be fixed, or where the API needs to be fixed?
(In reply to comment #8)
> Is this a case where the web UI needs to be fixed, or where the API needs to be
The API has a namespace filter. The user interface does not. The user interface should be updated to include a namespace selector. Clarified bug summary accordingly.
The worst-case behavior of the database query is very bad as there's not a clean index to work on, hence it's disabled in miser mode.
Since Delta was asking about this in #mediawiki, a summary:
1) The current query without namespace filtering will never scan more rows than the number of results it returns, e.g., 500.
2) The current query with namespace filtering will scan millions of rows in the worst case.
3) There is no likely way to change the schema to make the queries efficient. The only way I can think of is to denormalize unacceptably, as Brion says in comment 1.
4) For some reason, the query is enabled anyway for the API. I guess we could disable that too, but it's not a reason to enable it in the web UI. We don't like queries that scan millions of rows worst-case.
Delta tells me, though, that the thing people really want this for is to limit to the main namespace, or maybe to content namespaces. This is much less of a problem in practice than arbitrary namespace limitations. The real issue would be someone searching for all *.wikipedia.org links in Portal_talk or something. For real-world queries, limiting to content namespaces should only increase rows scanned by a fairly small fixed factor, probably less than ten. So that can be considered, IMO.
I filed bug 27717 ("API's exturlusage module does not respect $wgMiserMode").
*** Bug 48948 has been marked as a duplicate of this bug. ***
Has anything changed in the last few years? I was about to file an enhancement request for a namespace filter on Special:Linksearch but found this.
(In reply to Scott from comment #14)
> Has anything changed in the last few years? I was about to file an
> enhancement request for a namespace filter on Special:Linksearch but found
I requested this change a year ago but it looks like nobody's working to add this.
Maybe this can be done the same way as Gerrit change #117373, by adding a el_from_namespace column
Change 163470 had a related patch set uploaded by Umherirrender:
Add el_from_namespace column to support namespace filter