mw dev opensearch
Releasev0.35.0 · cfeceb67
Using this will automatically configure an opensearch server for MediaWiki via the CirrusSearch extension. In order for this to do anything you will need to CirrusSearch extension installed and enabled.
$wgCirrusSearchServers = [ 'opensearch' ];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 OpenSearch
php maintenance/runJobs.phpExposing locally
Section titled “Exposing locally”To expose the OpenSearch service locally, you can set the OPENSEARCH_PORT_9200 and OPENSEARCH_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 OPENSEARCH_PORT_9200 9200mw dev opensearch createDocumentation
Section titled “Documentation”Commands
Section titled “Commands”- mw dev opensearch create — Create the containers
- mw dev opensearch destroy — Destroy the containers
- mw dev opensearch exec — Execute a command in the main container
- mw dev opensearch image — Interact with the image used for the service
- mw dev opensearch rebuild — Build images and recreate the containers
- mw dev opensearch start — Start the containers
- mw dev opensearch stop — Stop the containers
Global options
Section titled “Global options”See also
Section titled “See also”Page views: —Sessions: —