API Reference / API Parameters / customNormalization
Type: object
Engine default: {}
Parameter syntax
'customNormalization' => [
  'default' => [
    'ä' => 'ae'
  ]
]

Can be used in these methods:

About this parameter

Override the default normalization handled by the engine.

This setting lets you override the engine’s default normalization by providing a custom normalization.

Usage notes

  • The input of a custom normalization must contain a single character.
  • The output of a custom normalization must have at most two characters.
  • This setting won’t work for records or queries that contain non-spacing mark Unicode characters. For example, ü cannot be custom-normalized into ue if ü is actually made of u (U+0075) + ◌̈ (U+0308). You can normalize ü if it’s a single character (U+00FC).

Examples

Set a custom normalization

1
2
3
4
5
6
7
$index->setSettings([
    'customNormalization' => [
        'default' => [
            'ä' => 'ae'
        ]
    ]
]);
Did you find this page helpful?