扩展:CirrusSearch

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:CirrusSearch and the translation is 81% complete.

Other languages:
English • ‎español • ‎русский • ‎فارسی • ‎ភាសាខ្មែរ • ‎中文 • ‎日本語
MediaWiki扩展手册
OOjs UI icon advanced.svg
CirrusSearch
发布状态: 稳定版
实现 Search, API , Hook
描述 使用Elasticsearch实现搜索MediaWiki
作者 Nik Everett, Chad Horohoe, Erik Bernhardson
最新版本 持续更新
兼容性方针 主线(master)
MediaWiki 1.23+
PHP 5.4+
数据更新
许可协议 GNU General Public License 2.0 or later
下载
README
  • $wgCirrusSearchServers
  • $wgCirrusSearchMaxRetries
  • $wgCirrusSearchSoftCommitTimeout
  • $wgCirrusSearchHardCommitTimeout
  • $wgCirrusSearchHardCommitMaxPendingDocs
  • $wgCirrusSearchCacheResultTime
  • $wgCirrusSearchCacheCleanupThread
  • $wgCirrusSearchFilterCacheSize
  • $wgCirrusSearchFilterCacheAutowarmCount
  • $wgCirrusSearchQueryResultCacheSize
  • $wgCirrusSearchQueryResultCacheAutowarmCount
  • $wgCirrusSearchDocumentCacheSize
  • many others
翻译CirrusSearch扩展如果在translatewiki.net可用
检查使用和版本矩阵。
Vagrant角色 cirrussearch
问题 开放的工作 · 报告错误

CirrusSearch扩展使用Elasticsearch实现搜索MediaWiki。

另见帮助:CirrusSearch 文档。

项目目标

  • 没有奇怪的依赖关系使这很难安装
    • 唯一的依赖项应该是纯PHP MediaWiki扩展和Elasticsearch本身
  • 为其他MediaWiki扩展可扩展的Wiki页面提供近实时搜索索引

提供MWSearch 为用户提供的所有查询选项等

依赖性

PHP and cURL
Elasticsearch
  • MediaWiki 1.28.x requires ElasticSearch 2.x.
  • MediaWiki 1.29.x and 1.30.x require ElasticSearch 5.3.x or 5.4.x.
  • MediaWiki 1.31.x and 1.32.x require ElasticSearch 5.5.x or 5.6.x.
  • MediaWiki 1.33.x requires ElasticSearch 6.5.x.
Elastica
  • Elastica is a PHP library to talk to Elasticsearch. Install Elastica per the instructions below.

Installation

Elastica

  • 下载文件,并将其放置在您extensions/文件夹中的Elastica目录内。
  • 运行Composer来安装PHP依赖,通过发行composer install --no-dev至扩展目录。 (参见T173141了解潜在问题。)
  • 将下列代码放置在您的LocalSettings.php的底部:
    wfLoadExtension( 'Elastica' );
    
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。

致使用MediaWiki 1.24或更早版本的用户:

上面的说明介绍的是安装此扩展的新方法,它使用wfLoadExtension() 如果您需要在早期版本(MediaWiki 1.24和更早版本)中安装此扩展,而不是wfLoadExtension( 'Elastica' );,您需要使用:

require_once "$IP/extensions/Elastica/Elastica.php";

CirrusSearch

  • 下载文件,并将其放置在您extensions/文件夹中的CirrusSearch目录内。
  • 将下列代码放置在您的LocalSettings.php的底部:
    require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
    
  • Now follow the setup instructions in the CirrusSearch README delivered with your extension i.e. $IP/extensions/CirrusSearch/README. Note that all info in it might not apply to your version of the extension, especially the version of Elasticsearch supported.
  • Configure as required.
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。

Upgrading

Please follow the upgrade instructions in the CirrusSearch UPGRADE file.

Configuration

The configuration options of CirrusSearch are documented at the docs/settings.txt file, and also in the CirrusSearch.php file.

See also documentation on CirrusSearch configuration profiles.

钩子

CirrusSearch extension defines a number of hooks that other extensions can make use of to extend the core schema and modify documents. 以下钩子可用:

API

CirrusSearch features can be used in API queries. 一些示例和查询:

参见