Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
4.1
-
None
-
New, Patch Available
Description
By concatenating generated ICU collation keys bytes with the originating term, it is possible to extract the originating term at a later time. This makes it possible to build a collator sorted facet field and similar multi-value/document structures.
ICU collation keys are guaranteed to be terminated by a 0 (https://ssl.icu-project.org/apiref/icu4j48rc1/com/ibm/icu/text/CollationKey.html) and since comparison of keys stop when a 0 is encountered, the addition of the originating term does not affect sort order. As 0 are only used for termination in the key bytes, the extraction of the originating term is unambiguous.