Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOBO-290 Facets with some surrogate pairs can't be loaded #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

BOBO-290 Facets with some surrogate pairs can't be loaded #19

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 27, 2014

Facet values with certain code points represented using UTF-16 surrogate pairs will result in this exception from TermStringList: "Values need to be added in ascending order."
Bobo expects all facet string values to be loaded in Java string order, which is UTF-16 code unit order. This is inconsistent with Unicode codepoint order and UTF-8 byte order (used by Lucene, and consistent with codepoint order). Bobo should use the same ordering as Lucene.
This is probably a bug in Java's String class, which was originally written for UCS-2 and didn't need to support surrogate pairs.
Workaround - use a Comparator that is consistent with Unicode code point order. icu4j can be used (MIT style license) https://ssl.icu-project.org/repos/icu/icu/trunk/license.html

https://senseidb.atlassian.net/browse/BOBO-290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants