4teamwork / ftw.solr

Solr integration for Plone
5 stars 5 forks source link

Add support for language specific fields #189

Closed buchi closed 2 years ago

buchi commented 2 years ago

Language specific fields require some special handling. If e.g. the field Title is indexed language specifically, you have to define a field for each supported language: Title_de, Title_en, Title_fr, etc. When indexing Title, Solr automatically renames the field to the detected language e.g. Title_de and indexes it. When indexing the field again, another language may be detected, e.g. Title_en. Because we use atomic updates, the previous Title_de is kept in the index. Therefore we first delete all language variants of the indexed field to ensure we only have the current value in the index.

In order to not duplicate configuration, we determine language specific fields from the Solr configuration.

For CA-4241