file-based TM upgrade through API?


in our project, we create project specific file-based TMs using the FileBasedTranslationMemory class. This works correctly and we are able to populate some segments in it using a standard TM update batch task. Unfortunately in Studio, this TM is marked with an orange triangle, advising to run an upgrade of the TM for better performance and we have just noticed that tokens in the TM are not indexed correctly: when a segment is searched in this file-based TM, a penalty is set when placeables are found in the segment, even if the segment and the TU are strictly identical.

After an upgrade of the TM, the TM search works correctly; there is no more penalty connected to tokens (when segment and TU are identical).

I've looked into the API documentation if there is any function to run an upgrade but I couldn't find any. Can you tell us, how should we proceed to run an upgrade of the file-based TM?

Kind regards