mw dev elasticsearch
Releasev0.35.0 · cfeceb67
Using this will automatically configure an elasticsearch server for MediaWiki via the CirrusSearch extension. In order for this to do anything you will need to CirrusSearch extension installed and enabled.
$wgCirrusSearchServers = [ 'elasticsearch' ];In order to configure a search index for a wiki, you’ll need to run some maintenance scripts:
# Configure the search index and populate it with contentphp extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.phpphp extensions/CirrusSearch/maintenance/ForceSearchIndex.php --skipLinks --indexOnSkipphp extensions/CirrusSearch/maintenance/ForceSearchIndex.php --skipParseAnd you’ll need to process the job queue any time you add/update content and want it updated in ElasticSearch
php maintenance/runJobs.phpExposing locally
Section titled “Exposing locally”To expose the Elasticsearch service locally, you can set the ELASTICSEARCH_PORT_9200 and ELASTICSEARCH_PORT_9300
environment variables to a port on your host machine.
For example, to expose the internal port 9200 to port 9200 on your host machine:
mw dev env set ELASTICSEARCH_PORT_9200 9200mw dev elasticsearch createDocumentation
Section titled “Documentation”Commands
Section titled “Commands”- mw dev elasticsearch create — Create the containers
- mw dev elasticsearch destroy — Destroy the containers
- mw dev elasticsearch exec — Execute a command in the main container
- mw dev elasticsearch image — Interact with the image used for the service
- mw dev elasticsearch rebuild — Build images and recreate the containers
- mw dev elasticsearch start — Start the containers
- mw dev elasticsearch stop — Stop the containers
Global options
Section titled “Global options”See also
Section titled “See also”Page views: —Sessions: —