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、570、571、600、601、274、275、828、829
默认:0
srwhat

要执行的搜索类型。

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

要返回的元数据。

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

要返回的属性:

size
Adds the size of the page in bytes.
wordcount
Adds the word count of the page.
timestamp
Adds the timestamp of when the page was last edited.
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
Deprecated and ignored.
hasrelated
Deprecated and ignored.
值(以|分隔):size、wordcount、timestamp、snippet、titlesnippet、redirecttitle、redirectsnippet、sectiontitle、sectionsnippet、isfilematch、categorysnippet、score、hasrelated
默认:size|wordcount|timestamp|snippet
sroffset

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

类型:整数
默认:0
srlimit

返回的总计页面数。

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

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

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

Enable internal query rewriting. Some search backends can rewrite the query into one its thinks gives better results, such as correcting spelling errors.

类型:布尔值(详细信息