Jump to content

扩展:TitleKey

From mediawiki.org
This page is a translated version of the page Extension:TitleKey and the translation is 56% complete.
MediaWiki扩展手册
TitleKey
发行状态: 稳定版
实现 搜索
描述 提供不区分大小写的标题前缀搜索
作者 Brooke Vibber留言
最新版本 持续更新
MediaWiki 1.25+
数据库更改
titlekey
许可协议 GNU通用公眾授權條款2.0或更新版本
下載
README
季度下載量 63 (Ranked 79th)
前往translatewiki.net翻譯TitleKey扩展
問題 开启的任务 · 报告错误

TitleKey扩展提供了一个不区分大小写的页面标题前缀搜索。 It uses a separate table for the keys so that it can be deployed without an expensive rebuild of core tables and uninstalled later in preference for a different search extension such as CirrusSearch .

For the average site administrator, the benefit of this extension is that it allows search suggestions (e.g., from Opensearch API) to be case-insensitive.

This extension provides no benefit if you are using CirrusSearch .

安裝

  • 下载文件,并将解压后的TitleKey文件夹移动到extensions/目录中。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleKey
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'TitleKey' );
    // For MW 1.42.0 and later (use SearchEngineMySQL, SearchEnginePostgres, or SearchEngineSqlite depending on your $wgDBtype)
    $wgSearchType = MediaWiki\Extension\TitleKey\SearchEngineMySQL::class;
    // For MW 1.39.x to 1.41.x
    $wgSearchType = MediaWiki\Extension\TitleKey\SearchEngine::class;
    
  • 运行更新脚本,它将自动创建此扩展必须依赖的数据库表。
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

Maintenance

The RebuildTitleKeys maintenance script can be used at any time to rebuild the title index (this requires command-line access):

$ path/to/mediawiki/maintenance/run RebuildTitleKeys
Or, for MediaWiki before 1.40:
$ php path/to/mediawiki/extensions/TitleKey/maintenance/rebuildTitleKeys.php