Available from version 1.24.0 (Gerrit change 104766)
Allows configuration of the mapping of fields
Define function:
public static function onCirrusSearchMappingConfig( array &$config, MappingConfigBuilder $builder ) { ... }
Attach hook:
$wgHooks['CirrusSearchMappingConfig'][] = 'MyExtensionHooks::onCirrusSearchMappingConfig';
Called from:File(s): CirrusSearch / includes/Maintenance/MappingConfigBuilder.php

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:CirrusSearchMappingConfig extensions.


  • $config - multi-dimensional configuration array that contains Elasticsearch document configuration.
    • The 'page' index contains configuration for Elasticsearch documents representing pages.
    • The 'namespace' index contains namespace configuration for Elasticsearch documents representing namespaces.
  • $builder - instance of CirrusSearch\Maintenance\MappingConfigBuilder, for easier use of utility methods to build fields.