API Reference / API Parameters / attributesToTransliterate
Type: object
Engine default: *
Parameter syntax
'attributesToTransliterate' => array(
  'attribute',
  // ...
)

Can be used in these methods:
setSettings

About this parameter# A

Specify on which attributes to apply transliteration.

Transliteration lets you search in one alphabet and find results in another. For example, in Japanese, transliterations lets users search in Hiragana, and find results that are indexed in Kanji or Katakana.

Usage notes#

  • Only Japanese is supported
  • You need to set indexLanguages to ja.
  • Attribute names are case-sensitive.

Examples# A

Set attributes to transliterate#

The following example enables transliteration when searching in the name or description attribute.

1
2
3
4
5
6
7
$index->set_settings(array(
  'indexLanguages' => ['ja'],
  'attributesToTransliterate' => array(
    'name',
    'description'
  )
));
Did you find this page helpful?
PHP v3