Api Settings
Search Settings
Search results limit
0.9.0 · Default 10
You can configure how many total pages to return per search. The value must be between 1 and 500
api.search_limit = 10
Changing the QiProfile
0.9.0 · Default engineautoselect
Select the query independent profile to use which affects the ranking algorithm of the search. Available profiles are
Name | Description | Config Name |
---|---|---|
Classic | Ranking based on the number of incoming links, some templates, page language and recency | classic |
ClassicNoBoostLinks | Ranking based on some templates, page language and recency when activated on the wiki | classicnoboostlinks |
WSumIncLinks | Weighted sum based on incoming links | wsuminclinks |
WSumIncLinksPV | Weighted sum based on incoming links and weekly pageviews | wsuminclinkspv |
PopularIncLinksPV | Ranking based primarily on page views | popularinclinkspv |
PopularIncLinks | Ranking based primarily on incoming links | popularinclinks |
EngineAutoselect | Let the search engine decide on the best profile to use | engineautoselect |
api.search_qiprofile = "engineautoselect"
Changing the search type
0.9.0 · Default text
There are multiple types of search that can be performed by wikipedia. Available settings are
nearmatch
Search just by a matchtext
Search the content of the pagetitle
Search the title of the page
api.search_type = "text"
Enabling query rewrites
0.9.0 · Default false
Enable interal query rewriting. Wikipedia can rewrite the query into another which is thought to provide better results by, for instance, correcting spelling errors
api.search_rewrites = true
Configuring the sort order
0.9.0 · Default relevance
Set the sort order of returned results. Available sort orders are:
createtimestampascending
: Sort the results by their creation date in ascending ordercreatetimestampdescending
: See above, but in descending orderincominglinksascending
: Sort the results by their amount of pages linking to it in ascending orderincominglinksdescending
: See above, but in descending orderjustmatch
: Sort the results only by their match to the querylasteditascending
: Sort the results by the time of their last edit in ascending orderlasteditdescending
: See above, but in descending ordernosort
: Don't sort the search resultsrandom
: Arrange the results in a random orderrelevance
: Sort the results by relevance
api.search_sort_order = "relevance"
Page Settings
Resolving redirects
0.9.0 · Default false
Whether to resolve page redirects directly
api.page_redirects = false
Changing the Language
Default: en
You can change the language of the articles and search by changing the api.language
setting in you
config file. The default language is English.
Changing the language to German
api.language = "de"
Using the language name in english aswell as the local language is also supported
api.language = "german"
api.language = "deutsch"
Hiding the language changed popup
Default: true
You can hide the 'Changed language to ...' popup by disabling the following setting
ui.popup_search_language_changed = false
Hiding the article language changed popup
Default: true
You can hide the 'Changed the language of your article to ...' popup by disabling the following setting
ui.popup_page_language_changed = false
Supported Languages
A list of all languages can be found here:
https://en.wikipedia.org/wiki/List_of_Wikipedias
About the support of languages
Some versions of Wikipedia have custom formatting different from the main wikipedia site. That means changing the language
to something other than English
can lead to incorrect formatting or missing data. A fix is planned but will take time
Changing the site
The options api.pre_language
and api.post_language
allow you to change the wiki site to,
theoretically, any Mediawiki based site. Make sure that api.post_language
points to the api
endpoint of the site, otherwise wiki-tui won't work.
Default
api.pre_language = "https://"
api.post_language = ".wikipedia.org/w/api.php"