Migration to multilingual search¶
New in version 25.4.
Multilingual search in VidiCore is based on search version 2. The system must be configured for search version 2 before multilingual search can be enabled. Usage of search version 2 API in conjunction with the new SearchDocument for sending search criteria is required.
After activating multilingual search, separate indices for each language will be required. The existing search 2 index will
become the default index for all metadata fields which are not configured as languageDependent and for all metadata fields
which do not have a lang attribute set in the MetadataDocument.
VidiCore is keeping track of all indices in the database.
Note
This feature for multilingual searching is in the beta phase. Following topics are subjects of change while in the beta status.
Ensure that search version 2 is enabled¶
Language dependency of metadata fields¶
Check the language dependency attributes of all metadata field definitions. For more information see Metadata fields language dependencies.
When the languageDependent attribute on a field is set to false the field is not allowed to contain language-specific information. Metadata fields which do contain
a lang attribute in the MetadataValueType but are not configured as languageDependent will cause an exception when creating an item or an collection.
A field whose languageDependent attribute is set to true may or may not contain lang attributes in MetadataDocument.
Synchronize default index¶
Before adding language-specific indices it is required to synchronize the default index of search version 2 with VidiCore’s database.
This is done by calling POST /APIinit/indices.
Activate multiple indices¶
Set the configuration property useMultipleSearchIndices to true to enable multiple indices
for multilingual search 2.
Recreate the default index for search version 2¶
Note
For systems upgraded to 25.4 from an earlier version, the default index of search version 2 must be re-created.
This is not necessary for new systems freshly installed with version 25.4 or later.
To re-create the default index of search version 2, the following steps are necessary:
- Delete the old default index via Delete index:
DELETE /API/index/NESTED- Create a new default index via Index creation. Set the
languageelement of the IndexDocument toNESTED.- Perform a reindex of the new default index via
PUT /API/reindex/(index)?type=NESTED, see Re-indexing metadata.
Create language specific indices¶
Create a language-specific index for each language via Index creation. Set the language element
of the IndexDocument to the language code of the index.
If you already have data in the system, a reindex of each language index is necessary, e.g.: PUT /API/reindex/(index)?lang=english, see Re-indexing metadata.