Gamepedia Help Wiki
mNo edit summary
No edit summary
Line 8: Line 8:
   
 
== Restricting the search ==
 
== Restricting the search ==
If you click the “{{int:searchbutton}}” button without filling in anything, you will be taken to “Special:Search” which gives you extra searching options (also available from any search results list)
+
If you click the “{{int:searchbutton}}” button without filling in anything, you will be taken to “[[Special:Search]]” which gives you extra searching options (also available from any search results list)
   
 
You may find it useful to restrict a search to pages within a particular [[Help:Namespaces|namespace]] (e.g., only search within the {{ns:2}} pages). Check the namespaces you require for this search.
 
You may find it useful to restrict a search to pages within a particular [[Help:Namespaces|namespace]] (e.g., only search within the {{ns:2}} pages). Check the namespaces you require for this search.

Revision as of 10:19, 19 August 2019

The quickest way to find information in Gamepedia Help Wiki is to use the Search function. Near the top-right of every page there is a search box.

Enter your search terms and press Enter or click the magnifying glass. If a page exists matching the title you entered, you will be taken directly to that page.

Otherwise, the search page displays, listing any articles whose titles or content partially matched your search terms — or a message that no matches were found.

To force the search listing page to display (prohibiting the search bar from jumping directly to a matching page), click the magnifying glass icon without entering any terms. The search page displays, and you can enter terms there to see a listing of pages whose titles or content matched, either exactly or partially.

Restricting the search

If you click the “Search” button without filling in anything, you will be taken to “Special:Search” which gives you extra searching options (also available from any search results list)

You may find it useful to restrict a search to pages within a particular namespace (e.g., only search within the User pages). Check the namespaces you require for this search.

By default, only the namespaces specified in your preferences will be searched. Logged-in users can change their preferences to specify the namespaces they want to search by default. This can be done by selecting and deselecting boxes in the ”search” section of user preferences.

Advanced searching

Insource

Insource searches can be used to find any one word rendered on a page, but it's made for finding any phrase you might find - including MediaWiki markup. This phrase completely ignores greyspace: insource: "state state autocollapse" matches |state=autocollapse.

insource: word

insource: "word1 word2"

Greyspace characters are ignored, just as they are with word searches and exact-phrase searches.
insource:/regexp/

insource:/regexp/i

These are regular expressions. They aren't efficient, so we can only allow a few at a time on the search cluster, but they are very powerful. The version with the extra i runs the expression case-insensitive, and is even less efficient.

Insource complements itself. On the one hand it has full text search for any word in the wikitext, instantly. On the other hand it can process a regexp search for any string of characters. Regex scan all the textual characters in a given list of pages; they don't have a word index to speed things up, and the process is interrupted if it must run more than twenty seconds. Regex run last, so to limit needless character-level scanning, you advance it a list of pages (a search domain) selected by an indexed search added to the query as a "clause", and you do this to every single regex query. Insource can play both roles, and the best candidate for insource:/arg/ is often insource: arg, where arg is the same.

The syntax for the regexp is insource: no space, and then /regexp/. (No other parameter disallows a space. All the parameters except insource:/regexp/ generously accept space after their colon.)

Insource indexed-search and regexp-search roles are similar in many respects:

  • Both search wikitext only.
  • Neither finds things "sourced" by a transclusion.
  • Neither does stemmed, fuzzy, or proximity searches.
  • Both want the fewest results, and both work faster when accompanied by another clause.

But indexed searches all ignore greyspace; wildcards searches do not match greyspace, so regex are the only way to find an exact string of any and all characters (for example: a sequence of two spaces). Regex are an entirely different class of search tool that make matching a literal string easy (basic, beginner use), and make matching by metacharacter expressions possible (advanced use) on the wiki.

The insource parameter treats words with embedded colons as one word. This affects search queries for templates, parser functions, URLs, wikilinks, HTML tags, and comments.
When possible, please avoid running a bare regexp search. See how this is always possible at Regular expression searches, on the Mediawiki help page linked below.
To search for words that begin with - or !, such as -in-law or !Kung, use a case-insensitive insource query together with a simple search on the "plain" version of the term (to avoid a bare regexp search). For example, "in-law" insource:/-in-law/i or "kung" insource:/!kung/i.

Further reading