mirror of https://github.com/apache/lucene.git
LUCENE-9053: improve FST's package-info.java comment to clarify required (Unicode code point) sort order for FST.Builder
This commit is contained in:
parent
fb3ca8d000
commit
8147e491ce
|
@ -34,7 +34,9 @@
|
||||||
* <p>
|
* <p>
|
||||||
* FST Construction example:
|
* FST Construction example:
|
||||||
* <pre class="prettyprint">
|
* <pre class="prettyprint">
|
||||||
* // Input values (keys). These must be provided to Builder in Unicode sorted order!
|
* // Input values (keys). These must be provided to Builder in Unicode code point (UTF8 or UTF32) sorted order.
|
||||||
|
* // Note that sorting by Java's String.compareTo, which is UTF16 sorted order, is not correct and can lead to
|
||||||
|
* // exceptions while building the FST:
|
||||||
* String inputValues[] = {"cat", "dog", "dogs"};
|
* String inputValues[] = {"cat", "dog", "dogs"};
|
||||||
* long outputValues[] = {5, 7, 12};
|
* long outputValues[] = {5, 7, 12};
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue