MediaWiki API 帮助

这是自动生成的MediaWiki API文档页面。

文档和例子:-{R|https://www.mediawiki.org/wiki/API:Main_page/zh}-

list=search (sr)

main | query | search
  • 此模块需要读取权限。
  • 此模块可作为发生器使用。
  • 来源:MediaWiki
  • 许可协议:GPL-2.0+

执行一次全文本搜索。

参数:
srsearch

搜索所有匹配此值的页面标题或内容。根据wiki的搜索后端工具,您可以使用搜索字符串以调用特殊搜索功能。

这个参数是必须的。
srnamespace

只在这些名字空间搜索。

值(以|分隔):0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15、100、101、102、103、104、105、106、107、110、111
默认:0
srwhat

要执行的搜索类型。

以下值中的一个:title、text、nearmatch
srinfo

要返回的元数据。

值(以|分隔):totalhits、suggestion、rewrittenquery
默认:totalhits|suggestion|rewrittenquery
srprop

要返回的属性:

size
添加页面大小,单位为字节。
wordcount
添加页面的字数。
timestamp
添加页面上次编辑时的时间戳。
snippet
Adds a parsed snippet of the page.
titlesnippet
Adds a parsed snippet of the page title.
redirecttitle
Adds the title of the matching redirect.
redirectsnippet
Adds a parsed snippet of the redirect title.
sectiontitle
Adds the title of the matching section.
sectionsnippet
Adds a parsed snippet of the matching section title.
isfilematch
Adds a boolean indicating if the search matched file content.
categorysnippet
Adds a parsed snippet of the matching category.
score
已弃用并已忽略。
hasrelated
Deprecated and ignored.
值(以|分隔):size、wordcount、timestamp、snippet、titlesnippet、redirecttitle、redirectsnippet、sectiontitle、sectionsnippet、isfilematch、categorysnippet、score、hasrelated
默认:size|wordcount|timestamp|snippet
sroffset

当更多结果可用时,使用这个继续。

类型:整数
默认:0
srlimit

返回的总计页面数。

不允许超过500个(对于机器人则是5,000个)。
类型:整数或max
默认:10
srinterwiki

搜索结果中包含跨wiki结果,如果可用。

类型:布尔值(详细信息
srenablerewrites

启用内部查询重写。一些搜索后端可以重写查询到它认为会给出更好结果的地方,例如纠正拼写错误。

类型:布尔值(详细信息