indexLanguages
[]
'indexLanguages' => ['language ISO code', ...]
Can be used in these methods:
setSettings
set_settings
setSettings
set_settings
setSettings
setSettings
SetSettings
setSettings
SetSettings
setSettings
About this parameter
Sets the languages at the index level for language-specific processing, such as tokenization and normalization.
At indexing time, the parameter sets the dictionary and algorithms for word-detecting in the provided language. See the list of supported languages for the corresponding ISO codes.
You can configure the index languages in the Algolia dashboard under Search > Index > Configuration > Language > Index Languages. You can also use the set-settings
API method to configure the indexLanguages
parameter.
Usage notes
You should always set queryLanguages
and indexLanguages
for your indices. If you don’t, the engine uses either the default (all supported languages) or the list of languages specified in ignorePlurals
and removeStopWords
.
This can lead to unexpected search results.
Examples
Set an index language for tokenization and normalization
For example, to set the index language to Japanese (‘ja’):
1
2
3
$index->setSettings([
'indexLanguages' => ['ja']
]);