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
默认:0
srlimit

返回的总计页面数。

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

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

类型:整数
默认:0
srwhat

要执行的搜索类型。

以下值中的一个:titletextnearmatch
srinfo

要返回的元数据。

值(以|替代物分隔):totalhitssuggestionrewrittenquery
默认: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
添加匹配的重定向的标题。
redirectsnippet
添加被解析的重定向标题的片段。
sectiontitle
Adds the title of the matching section.
sectionsnippet
Adds a parsed snippet of the matching section title.
isfilematch
添加布尔值,表明搜索是否匹配文件内容。
categorysnippet
Adds a parsed snippet of the matching category.
score
已弃用并已忽略。
hasrelated
已弃用并已忽略。
值(以|替代物分隔):sizewordcounttimestampsnippettitlesnippetredirecttitleredirectsnippetsectiontitlesectionsnippetisfilematchcategorysnippetscorehasrelated
默认:size|wordcount|timestamp|snippet
srinterwiki

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

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

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

类型:布尔值(详细信息