API Reference / API Parameters / keepDiacriticsOnCharacters
Jan. 14, 2019

keepDiacriticsOnCharacters

Type: string
Engine default: ""
Parameter syntax
'keepDiacriticsOnCharacters' => 'øé'

Can be used in these methods:

About this parameter

Characters that should not be automatically normalized by the search engine.

By default, the Algolia search engine is normalizing characters to transform them to their lowercase counterpart and strip them from their diacritics. As an example: é becomes e, ø becomes o, becomes , etc. This default behavior being an issue with several languages, this setting allows one to disable the automatic normalization on a given set of characters.

Usage notes:

  • The setting only accepts lowercase characters, but also apply to their uppercase counterpart; for example, Ø is considered invalid, but specifying ø will prevent both ø and Ø to be normalized to o.

  • The setting only accepts characters that would be transformed otherwise; for example, o is considered invalid.

Examples

Set the characters for which diacritics should be preserved

1
2
3
$index->setSettings([
  'keepDiacriticsOnCharacters' => 'øé'
]);

Did you find this page helpful?