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+
資料庫變更
授權 GNU General Public License 2.0 or later
下載
README
前往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 is incompatible with CirrusSearch .

安裝

  • 下載檔案,並解壓TitleKey資料夾到extensions/目錄中。
    開發者和代碼貢獻人員應改從Git安裝此擴充功能,輸入:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleKey
    
  • 請新增下列程式碼到您的LocalSettings.php 檔案的底部:
    wfLoadExtension( 'TitleKey' );
    // For MW 1.43.0 and above, no further configuration is needed.
    
    // For MW 1.42.x (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.php RebuildTitleKeys

Or, for MediaWiki before 1.40:

$ php path/to/mediawiki/extensions/TitleKey/maintenance/rebuildTitleKeys.php