"Repairing out of order string range index messages" in your ErrorLog
08 February 2021 12:51 PM
After upgrading to MarkLogic 10.x from any of the previous versions of MarkLogic, examples of the following Warning and Notice level messages may be observed in the ErrorLogs:
Starting with MarkLogic 10.0, the server now automatically checks for any lexicons or string range indexes that may be in need of repair. Lexicons and range indexes perform "self-healing" in non-read-only stands whenever a lexicon/range index is opened within the stand.
This is due to changes introduced to the behavior of MarkLogic's root collation.
Starting with MarkLogic 10.0, the root collation has been modified, along with all collations that derive from it, which means there may be some subtle differences in search ordering.
For more information on the specifics of these changes, please refer to http://www.unicode.org/Public/UCA/6.0.0/CollationAuxiliary.html
This helps the server to support newer collation features, such as reordering entire blocks of script characters (for example: Latin, Greek, and others) with respect to each other.
Implementing these changes has, under some circumstances, improved the performance of wildcard matching by more effectively limiting the character ranges that search scans (and returns) for wildcard-based matching.
Based on our testing, we believe this new ordering yields better performance in a number of circumstances, although it does create the need to perform full reindexing of any lexicon or string range index using the root collation.
MarkLogic Server will now check lexicons and string range indexes and will try to repair them where necessary. During the evaluation, MarkLogic Server will skip making further changes if any of the following conditions apply:
(a) They are already ordered according to the latest specification provided by ICU (1.8 at the time of writing)
(b) MarkLogic Server has already checked the stand and associated lexicons and indexes
(c) The indexes use codepoint collation (in which case, MarkLogic Server will be unable to change the ordering).
Whenever MarkLogic performs any repairs, it will always log a message at Notice level to inform users of the changes made. If for any reason, MarkLogic Server is unable to make changes (e.g. a forest is mounted as read-only), MarkLogic will skip the repair process and nothing will be logged.
As these changes have been introduced from MarkLogic 10 onwards, you will most likely observe these messages in cases where recent upgrades (from prior releases of the product) have just taken place.
Repairs are performed on a stand by stand basis, so if a stand does not contain any values that require ordering changes, you will not see any messages logged for that stand.
Also, if any ordering issues are encountered during the process of a merge of multiple stands, there will only be one message logged for the merge, not one for each individual stand involved in that merge.
Known side effects
If the string range index or lexicon is very large, repairing can cause some performance overhead and may impact search performance during the repair process.
These messages can be avoided by issuing a full reindex of your databases immediately after performing your upgrade to MarkLogic 10.