Page MenuHomePhabricator

Offer "linkedfrom:" in Advanced Search (inverted "linksto:")
Open, MediumPublicFeature

Description

In search, please implement linkedfrom: which works like linksto: but filters articles linked to rather than those linked from. This would transform the ease of many searches which are currently very difficult. For example, I am currently trying to find which articles linked from long lists of alleged politicians are not in fact politicians but people notable in other areas who happen to share their names with obscure politicians. This task seems very difficult, even for an experienced PetScan and Quarry user, but would become trivial with something like 'linkedfrom:"List article" -politician'. I see multiple requests for this feature on enwki dating back to 2004, but no good workaround.

Details

Event Timeline

Aklapper renamed this task from Feature request: linksfrom to Offer "linksfrom:" in Advanced Search (inverted "linksto:").May 26 2020, 3:59 PM
Aklapper changed the subtype of this task from "Task" to "Feature Request".

Change #885916 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/CirrusSearch@master] [WIP] Add LinkedFromFeature

https://gerrit.wikimedia.org/r/885916

Nardog renamed this task from Offer "linksfrom:" in Advanced Search (inverted "linksto:") to Offer "linkedfrom:" in Advanced Search (inverted "linksto:").Jun 6 2024, 3:21 AM
Nardog updated the task description. (Show Details)

As evident in hastemplate, "links" in linksto is the third-person singular verb, not the plural noun. linksfrom wouldn't make much sense.

Gehel triaged this task as Medium priority.Jun 17 2024, 3:19 PM
Gehel edited projects, added: Discovery-Search; removed: Discovery-Search (Current work).
Gehel moved this task from needs triage to Feature Requests on the Discovery-Search board.

This feature would be useful for wikiprojects, where we often want to list pages linked from the wikiproject watchlist that, for example, have the Template:References or Template:Update or some other condition. This would be easy to achieve with a query like "linkedfrom:WikiProject:Philosophy/watchlist hastemplate:Update".

My specific use case: our {{disambiguation}} template offers a query search for words in title sorted by newest to oldest:

  1. Example page: https://ru.wikipedia.org/wiki/Соколов,_Николай
  2. Example query: https://ru.wikipedia.org/w/index.php?title=Служебная:Поиск&search=intitle%3A"Соколов"+intitle%3A"Николай"&sort=create_timestamp_desc&ns0=1
  3. Implementation if you’re curious: https://ru.wikipedia.org/wiki/Модуль:Disambig#L-172

and this sort of query would be infinitely more useful if there was an option to do it with -linkedfrom:"Соколов, Николай", i.e. excluding already linked stuff (obviously we need to write a script that does this sort of job for us, but good old reliable wiki search is still nice if you don’t have user scripts).