Jump to content

Topic on Help talk:CirrusSearch/Flow

i want all existing templates

5
Wladek92 (talkcontribs)

hi all, going to -> https://www.mediawiki.org/w/index.php?search=%2A&title=Special:Search&profile=advanced&fulltext=1&ns10=1 i want all existing templates ie all pages title in ns Template: . After setting this single ns only from the drop list, i tried several forms but without success: 1. with no string i get no result 2. with joker '*' i get the template * only.

So please what is the syntax ? of this elementary request "give me all page titles of ns Template:" Thanks -- Christian 🇫🇷 FR (talk) 07:03, 27 June 2023 (UTC)

TheDJ (talkcontribs)

Search cannot do that. That's what the api or quarry is for.

Tacsipacsi (talkcontribs)
Cpiral (talkcontribs)

That is a feature that I too once wanted: a list of page titles matching some query. Instead I settled on storing the search result as text, and then using my text-processing skills to extract the titles.


In your case it works to first capture the search result of prefix: template: to file.


Then you grep, and can sort them alphabetically.

TheDJ (talkcontribs)

Again, this is not what you are supposed to use search for. If you want a list, you should use something made to generate lists, like Special:AllPages, database dumps or quarry. Search is fuzzy, its optimised to find words, not to generate lists.


This is an example to get the first 50 template names on mediawiki.org which are not redirects and not deleted:

https://quarry.wmcloud.org/query/74910


And when lists get really big, you will HAVE to use pagination. There is no way around this as WMF properties generally are very big properties.

Reply to "i want all existing templates"