-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
To enable CirrusSearch, we need an Elasticsearch container compatible with the MediaWiki version (typically ES 7.10.x for modern MW) and specific configuration in LocalSettings.php.
1. docker-compose.yml
Add the elasticsearch service. We define a single-node cluster and limit memory usage to prevent it from overwhelming the host.
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
volumes:
# Ensure this volume is added to the top-level volumes section as well
- elasticsearch-data:/usr/share/elasticsearch/data2. LocalSettings.php
Elastica and CirrusSearch must be loaded and configured to point to the elasticsearch container.
# Load extensions
wfLoadExtension( 'Elastica' );
wfLoadExtension( 'CirrusSearch' );
# Configure CirrusSearch
$wgCirrusSearchServers = [ 'elasticsearch' ];
$wgSearchType = 'CirrusSearch';
# Ensure updates are processed
$wgDisableSearchUpdate = false;3. Post-Install Actions
After the containers are up, the search index must be initialized via the container:
php extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php
php extensions/CirrusSearch/maintenance/ForceSearchIndex.php --skipLinks --indexOnSkip
php extensions/CirrusSearch/maintenance/ForceSearchIndex.php --skipParseReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request