Open main menu

Extension:CirrusSearch/Hooks/CirrusSearchMappingConfig

CirrusSearchMappingConfig
Available from version 1.24.0
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): 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.

This hook is a part of CirrusSearch extension .

DetailsEdit

  • $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.

See alsoEdit