Extension:CirrusSearch

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

Project goals

 * 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

 * PHP and cURL
 * In addition to the standard MediaWiki requirements for PHP, CirrusSearch requires PHP to be compiled with cURL support.
 * Elasticsearch
 * You will need to install Elasticsearch.
 * MediaWiki 1.28 and higher require ElasticSearch 2.x.
 * ElasticSearch 5.x is not yet supported (T154501)
 * For earlier versions of MediaWiki, use ElasticSearch 1.7. The latest on that branch is version 1.7.5.
 * Extension:Elastica
 * Elastica is a PHP library to talk to Elasticsearch. Install Elastica per the instructions below.

CirrusSearch
Now follow the setup instructions in the CirrusSearch README delivered with your extension i.e.  (Here's the most up-to-date version of the README. But note that all info in it might not apply to your version of the extension, especially the version of Elasticsearch supported.)

Configuration
Should be configured with the servers (names or IP addresses) running elasticsearch without providing the port. For example: Other configuration is available and is documented in the file.
 * $wgCirrusSearchServers

Hooks
CirrusSearch extension defines a number of hooks that other extensions can make use of to extend the core schema and modify documents. The following hooks are available:
 * CirrusSearchAnalysisConfig - allows to hook into the configuration for analysis
 * CirrusSearchMappingConfig - allows configuration of the mapping of fields
 * CirrusSearchBuildDocumentParse - allows extensions to modify ElasticSearch document produced from a page
 * CirrusSearchBuildDocumentLinks - allows extensions to process incoming and outgoing links for the document
 * CirrusSearchBuildDocumentFinishBatch - called when a batch of pages has been indexed
 * CirrusSearchAddQueryFeatures - allows extensions to add query parser features
 * CirrusSearchScoreBuilder - allows extensions to define rescore builder functions