Extension:CirrusSearch

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
CirrusSearch

Release status: beta

Implementation Search, API, Hook
Description Implements searching for MediaWiki using Elasticsearch
Author(s) Nik Everett, Chad Horohoe
Latest version 0.2 (2014-10-09)
MediaWiki 1.23+
PHP 5.3+
Database changes No
License GPLv2
Download
README
Parameters
  • $wgCirrusSearchServers
  • $wgCirrusSearchMaxRetries
  • $wgCirrusSearchSoftCommitTimeout
  • $wgCirrusSearchHardCommitTimeout
  • $wgCirrusSearchHardCommitMaxPendingDocs
  • $wgCirrusSearchCacheResultTime
  • $wgCirrusSearchCacheCleanupThread
  • $wgCirrusSearchFilterCacheSize
  • $wgCirrusSearchFilterCacheAutowarmCount
  • $wgCirrusSearchQueryResultCacheSize
  • $wgCirrusSearchQueryResultCacheAutowarmCount
  • $wgCirrusSearchDocumentCacheSize
  • many others
Hooks used
AfterImportPage

ApiBeforeMain
ArticleDelete
ArticleDeleteComplete
ArticleRevisionVisibilitySet
BeforeInitialize
GetBetaFeaturePreferences
LinksUpdateComplete
PrefixSearchBackend
SearchGetNearMatch
SoftwareInfo
SpecialRandomGetRandomTitle
SpecialSearchResultsPrepend
TitleMove
TitleMoveComplete
UnitTestsList

Translate the CirrusSearch extension if it is available at translatewiki.net

Check usage and version matrix; code metrics
Bugs: list open list all report

The CirrusSearch extension implements searching for MediaWiki using Elasticsearch. See Help:CirrusSearch for documentation.

Project goals[edit | edit source]

  • No weird dependencies that make this difficult to install
    • The only dependencies should be pure-PHP MediaWiki extensions and Elasticsearch itself
  • Provide a near-real-time search index for wiki pages that's extendable by other MediaWiki extensions
  • Provide all of the query options MWSearch has given users, and more

Dependencies[edit | edit source]

  • Elasticsearch
  • You will need to install Elasticsearch. Information on installing/maintaining Elasticsearch itself can be found at elasticsearch.org.

Installation[edit | edit source]

Elastica[edit | edit source]

  • Download and extract the file(s) in a directory called Elastica in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/Elastica/Elastica.php";
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

CirrusSearch[edit | edit source]

  • Download and extract the file(s) in a directory called CirrusSearch in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Now follow the setup instructions in CirrusSearch's README.

Configuration[edit | edit source]

$wgCirrusSearchServers

Should be configured with the servers (names or IP addresses) running elasticsearch. For example:

$wgCirrusSearchServers = array( 'search01', 'search02' );

Other configuration is available and is documented in the CirrusSearch.php file.

See also[edit | edit source]