MediaWiki API ヘルプ
このページは自動生成された MediaWiki API の説明文書ページです。
説明文書と例: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
list=search (sr)
- このモジュールは読み取りの権限を必要とします。
- このモジュールはジェネレーターとして使用できます。
- ソース: MediaWiki
- ライセンス: GPL-2.0-or-later
全文検索を行います。
パラメーター:
- srsearch
この値を含むページ名または本文を検索します。Wikiの検索バックエンド実装に応じて、あなたは特別な検索機能を呼び出すための文字列を検索することができます。
- このパラメーターは必須です。
- srnamespace
この名前空間内のみを検索します。
- 値 (|もしくは別の文字列で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15、274、275、828、829、844、845、2300、2301、2302、2303、4000、4001、5500、5501
- すべての値を指定するには、*を用いてください。
- Default: 0
- srlimit
返すページの総数です。
- 型: 整数または max
- The value must be between 1 and 500.
- Default: 10
- sroffset
When more results are available, use this to continue.
- 型: 整数
- Default: 0
- srqiprofile
Query independent profile to use (affects ranking algorithm).
- classic
- Ranking based on the number of incoming links, some templates, page language and recency (templates/language/recency may not be activated on this wiki).
- classic_noboostlinks
- Ranking based on some templates, page language and recency when activated on this wiki.
- empty
- Ranking based solely on query dependent features (for debug only).
- wsum_inclinks
- Weighted sum based on incoming links
- wsum_inclinks_pv
- Weighted sum based on incoming links and weekly pageviews
- popular_inclinks_pv
- ページ閲覧数による順位
- popular_inclinks
- リンク元の件数による順位
- engine_autoselect
- Let the search engine decide on the best profile to use.
- 値 (次の値のいずれか1つ): classic、classic_noboostlinks、empty、engine_autoselect、popular_inclinks、popular_inclinks_pv、wsum_inclinks、wsum_inclinks_pv
- Default: engine_autoselect
- srwhat
実行する検索の種類です。
- 値 (次の値のいずれか1つ): nearmatch、text、title
- srinfo
どのメタデータを返すか。
- 値 (|もしくは別の文字列で区切る): rewrittenquery、suggestion、totalhits
- Default: 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
- 合致するタイトルを追加します。
- 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
- 廃止予定です。 Ignored.
- hasrelated
- 廃止予定です。 Ignored.
- extensiondata
- Adds extra data generated by extensions.
- 値 (|もしくは別の文字列で区切る): categorysnippet、extensiondata、isfilematch、redirectsnippet、redirecttitle、sectionsnippet、sectiontitle、size、snippet、timestamp、titlesnippet、wordcount、hasrelated、score
- Default: size|wordcount|timestamp|snippet
- srinterwiki
Include interwiki results in the search, if available.
- 型: 真偽値 (詳細)
- srenablerewrites
Enable internal query rewriting. Some search backends can rewrite the query into another which is thought to provide better results, for instance by correcting spelling errors.
- 型: 真偽値 (詳細)
- srsort
Set the sort order of returned results.
- 値 (次の値のいずれか1つ): create_timestamp_asc、create_timestamp_desc、incoming_links_asc、incoming_links_desc、just_match、last_edit_asc、last_edit_desc、none、random、relevance
- Default: relevance
例:
- meaning を検索する。
- api.php?action=query&list=search&srsearch=meaning [サンドボックスで開く]
- Search texts for meaning.
- api.php?action=query&list=search&srwhat=text&srsearch=meaning [サンドボックスで開く]
- meaning の検索で返されたページのページ情報を取得する。
- api.php?action=query&generator=search&gsrsearch=meaning&prop=info [サンドボックスで開く]