Mapping custom locales in Elasticsearch to ensure IQ search indexing works
If your search engine indexing is not able to index you may need to map any custom languages to standard two-letter language keys. The IQ search is using a third party search engine, the Elasticsearch, so you need to make changes to your Elasticsearch instance. This is for the case where you do the mapping later, that is not at install time.
Before you begin
- The names of the custom language values that need to be mapped to standard two-letter language keys. (For example
Anglaisshould be mapped to theenkey.) - the URL of your Elasticsearch instance
- Some Elasticsearch engine parameters. Specifically, the names of the configuration index and the mapping or scheme. If you used the default
bootstrap.jsonat installation time, these names areudp-configurationfor the indexlocale-to-languagefor the mapping.
About this task
The Elasticsearch search engine indexes search strings by two-letter language codes (for example, fr for French). In SDL Knowledge Center, DITA content can denote its language the same way (for example, using en for English). But the DITA content can also use a five-character language-plus-locale string (for example, en-us for US English) or a custom string (for example, Anglais for English) to denote the content language.
By default, SDL Knowledge Center assumes that the first two characters of the DITA language value denote the correct Elasticsearch language in which to index. This approach works for strings such as en and en-us: both resolve to en, the right Elastisearch language. But this approach does not work for strings like Anglais, which resolves to the meaningless string An. In that last case, you must configure how your custom language values map to Elasticsearch languages.