Template:Search results
Use this template to search and display search results in a wiki page.
Note! By default, pages in Category:Automatic translations and Category:Maintenance pages are excluded from the search results.
Parameters
[edit source]queryor1- Required! Search query. See mw:Help:CirrusSearch for all available search operators. For example:water- Search all pages with "water" in the text or title-water- Search all pages without "water" in the text or titleintitle:water- Search all pages with "water" in the title-intitle:water- Search all pages without "water" in the titleincategory:Water- Search all pages in Category:Water-incategory:Water- Search all pages not in Category:Waterlinksto:Water- Search all pages that link to Water-linksto:Water- Search all pages that don't link to Waterinlanguage:es- Search all Spanish pages-inlanguage:en- Search all non-English pageshastemplate:Page_data- Search all pages with Template:Page data-hastemplate:Page_data- Search all pages without Template:Page datasubpageof:Water- Search all subpages of Water-subpageof:Water- Search all pages that are not a subpage of Water
namespace- Namespace to search, defaults to the main namespace. For example:namespace=2- Search user pages (see namespace numbers)namespace=*- Search all namespaces
limit- Max number of results, defaults to 10. For example:limit=100- Limit to 100 search resultslimit=max- Maximum allowed number of results (5000)
sort- Sort criteria, defaults to 'relevance'. Allowed values:sort=create_timestamp_asc- Oldest pages firstsort=create_timestamp_desc- Most recent pages firstsort=incoming_links_asc- Least linked pages firstsort=incoming_links_desc- Most linked pages firstsort=last_edit_asc- Most recently edited pages firstsort=last_edit_desc- Least recently edited pages firstsort=random- Random sortingsort=relevance- Sort by relevance as determined by the search engine
format- Format of the search results, defaults to 'list'. Allowed values:format=list- Return an unordered list (<ul>) of search results, linked to their pagesformat=card- Return pretty search cards (see Template:Search results/card)format=count- Return the total number of search results as a plain numberformat=plain- Return a comma-separated list of plain titles for further processingformat=json- Return a JSON object for further processing, for example in a Lua module
Examples
[edit source]Basic
[edit source]{{Search results|panel}}
Search operators
[edit source]{{Search results|panel incategory:Photovoltaics linksto:Solar_energy}}
- Solar-charged lawnmower
- Solar energy conversion system
- Engr 305 solar learning station
- APSC 100 213B Solar Powered Laptop
- Robin deterrent for solar charger
- Effects of snow on photovoltaic performance
- Open Solar Outdoors Test Field
- Optimal inverter and wire selection for solar photovoltaic fencing applications
- Design of Post-Consumer Modification of Standard Solar Modules to Form Large-Area Building-Integrated Photovoltaic Roof Slates
- UTC photovoltaic learning station
Parameters
[edit source]{{Search results|panel|limit=5|sort=create_timestamp_asc}}
- Students for Global Sustainability/lecture
- Methane as fuel
- Bioconversion of Organic Residues for Rural Communities/Availability of organic residues as a rural resource
- Bioconversion of Organic Residues for Rural Communities/Biogas generation: developments. Problems, and tasks - an overview
- Bioconversion of Organic Residues for Rural Communities/The combination of algal and anaerobic waste treatment in a bioregenerative farm system
Card format
[edit source]{{Search results|panel|format=card|limit=5}}
Search in more than one category
[edit source]Searching the term 'water' in pages that belong to both Category: Projects and Category:Literature reviews:
{{Search results|water incategory:"Projects" incategory:"Literature reviews"|limit=5|format=list}}
Template data
[edit source]Use this template to search and display search results in a wiki page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Query | query 1 | Search query
| String | required |
| Namespace | namespace | Namespace to search (use * for all)
| Number | optional |
| Limit | limit | Max number of results (use 'max' for maximum allowed)
| Number | optional |
| Sort | sort | Sort criteria
| String | optional |
| Format | format | Format of the search results
| String | suggested |
| Template | template | Template to use with the template format | Template | optional |
| Class | class | Additional CSS class
| String | optional |
| Automatic translations | automatic-translations | Include automatic translations in the search results?
| Boolean | optional |
| Maintenance pages | maintenance-pages | Include maintenance pages in the search results?
| Boolean | optional |
See also
[edit source]- Template:Search - Create smart and friendly links to search results
- mw:Extension:SearchParserFunction - Extension on which this template is based
- mw:Help:CirrusSearch - Advanced search features