🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
API Reference / API Parameters / keepDiacriticsOnCharacters
Type: string
Engine default: ""
Parameter syntax
'keepDiacriticsOnCharacters' => 'øé'

Can be used in these methods:

About this parameter

List of characters that the engine shouldn’t automatically normalize.

By default, the Algolia search engine normalizes all characters to their lowercase counterpart, and strips them from their diacritics. For example, "é" becomes "e", "ø" becomes "o", "で" becomes "て", and so on. This default behavior can be an issue for certain languages. This setting lets you disable automatic normalization on a given set of characters.

Usage notes

  • The setting only accepts lowercase characters, but also applies to their uppercase counterpart. For example, "Ø" is an invalid value for this setting, but specifying "ø" prevents the normalization of both "ø" and "Ø".
  • The setting only accepts characters that would be transformed otherwise. For example, "o" is considered invalid because it doesn’t have any diacritic.

Examples

Set the characters for which diacritics should be preserved

1
2
3
$index->setSettings([
  'keepDiacriticsOnCharacters' => 'øé'
]);
Did you find this page helpful?