(Comment rows about regular expression + Add note about regular expression searches being disabled) |
m (1 revision imported: New Files) |
Latest revision as of 11:54, 24 March 2024
This is a cheatsheet of search syntax that can be used in the on-wiki search box.
In general all of the syntax can be combined together, so you can use a wildcarded specific phrase with a namespace, insource, and incategory all at once. Multiple of each can be used too, like a few different insource usages. Multiple terms together are implicitly ANDed.
The wiki uses CirrusSearch to power the search box. See the full details on all of the syntax in the documentation or general concepts on MediaWiki.org.
Syntax | Description | Example |
---|---|---|
General | ||
plain words
|
Search for the words | fidelity
|
"specific phrase"
|
Search for the specific phrase. Unless otherwise mentioned, this can be used with most other parameters. | "above its weight class"
|
wild* searc\?
|
Search for the words, where \? is any one character[1] and * is any one or more characters[2]. Wildcards can be used in plain words, specific phrase, or insource searches.
|
carr*
|
!inverted -inverted
|
Inverts the search term, making it 'exclude this word' or 'exclude this parameter', etc. ! and - are the same meaning.
|
carrack -fuel
|
search OR term
|
Combines two searches together so that the results include either of the parameters/parameter groups (or both). When combining with other terms, use brackets to specify what terms should be ORed and what should be implictly ANDed. | bespoke OR fidelity
|
Filters | ||
Namespace: rest of search
|
Filter results to the specific namespace. (Note the space between the namespace and the rest of the search.) You can also use the checkboxes on Special:Search. | Update: carrack
|
prefix:start of title
|
Filter results to pages that have names beginning with the specified word or phrase. Unlike other parameters, quoting is not necessary for phrases. Essentially the same functionality as Special:PrefixIndex, but with the rest of the search utility. | prefix:carrack
|
Wiki utility | ||
intitle:"words in title"
|
Filter results to pages where the page name contains the specified word or phrase. | intitle:best intitle:ship
|
incategory:"category"
|
Searches for results in the specified category. | carrack incategory:ships
|
linksto:"page to link to"
|
Searches for pages that link to the specified page. Similar to Special:WhatLinksHere. | linksto:"Anvil Aerospace"
|
hastemplate:"template"
|
Searches for pages that use to the specified template. Similar to Special:WhatLinksHere set to transclusions only. | hastemplate:"Infobox vehicle"
|
subpageof:"page"
|
Searches for pages that are a subpage of the specified page. Similar to Special:PrefixIndex. | subpageof:carrack
|
insource:word insource:"source code"
|
Searches for the word or phrase in the wikitext of pages. Greyspace[3] is ignored. Wildcards can be used to replace some level of regular expressions. This search can be slow - generally best when used with other searches. | insource:"above its weight class"
|
Advanced | ||
fuzzy~ "fuzzy search"~3
|
Enables a 'fuzzy' search, allowing some level of letter replacement or word shuffling. The first usage is only for single words and allows some amount of letter replacement (by default up to 2 letters except the first two). The second usage requires a number for the 'degree' of fuzziness, where 0 is not fuzzy - the degree determines how many word swaps or other words can be added. See documentation for details. | vulture~ (compare vulture )"venture"~2 (compare "venture" )
|
morelike:page1|page2|...
|
Increases the page weight (increases relevancy, pushing the results to the top) for pages with text similar to the specified page(s). Can be further tuned by applying URL parameters, see documentation for details. | morelike:Carrack|Odyssey
|
prefer-recent:amount,time
|
Increases page relevancy by amount if the page has been edited within the last time number of days. Both parameters are optional - just doing prefer-recent: uses the default of 0.6,160 , which is a 60% boost for pages edited within the last 160 days.[4]
|
Anvil prefer-recent:
|
boost-templates:"template|amount%"
|
Increases page relevancy by amount percent if the page uses the specified template. Multiple usages with different templates can be used to further refine results.
|
Anvil boost-templates:"Template:Infobox vehicle|200%"
|
Files[5] | ||
filetype:type
|
Searches for files with specific internal type. Types are: unknown , bitmap , drawing , audio , video , multimedia , office , text , executable , archive .
|
File: filetype:bitmap
|
filemime:type
|
Searches for files with the MIME type - either an exact MIME type, like image/png , or a partial MIME type, like gif .
|
File: intitle:logo filemime:svg
|
filesize:number - mimimum sizefilesize:<number - maximum sizefilesize:number1,number2 - size range
|
Searches for files with the file size (in kibibtyes[6]). Can search for a minimum, maximum, or a range. | File: filesize:4096
|
fileX:number - exactfileX:>number - mimimumfileX:<number - maximumfileX:number1,number2 - range
|
Search for files with the specific measure at the specific size or size range. fileX can be any of: filew for file width, fileh for file height, fileres for file resolution[7], or filebit for file bit depth.
|
File: fileh:3000
|
- ↑ The wildcard
\?
is must be used with the escaping backslash - plain question marks are treated literally as searches can contain questions. - ↑ The
*
wildcard must follow one other non-wildcard character - it cannot be the first character - ↑ Greyspace is defined as any of these characters
~!@#$%^&*()_+-={}|[]\:";'<>?,./
. In general greyspace characters are treated as 'word boundaries' - removed and replaced with a space. - ↑ Technically, the time specified in prefer-recent is the half-life of the boost amount; the boost amount is halved every number of days.
- ↑ These do not imply the File: namespace filter - you will need to specify that too (or use the checkboxes).
- ↑ 1 kibibyte (1KiB) = 1024 bytes.
- ↑ File resolution is defined as sqrt(height × width)