lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uwe Schindler <>
Subject Re: Get original DocValues from ICUCollationDocValuesField
Date Sun, 30 Apr 2017 20:36:53 GMT

No. Collation keys are a one-way function. You need to index it into 2 different fields, once
for sorting as collation key and once for facetting or display.


Am 30. April 2017 22:29:23 MESZ schrieb "Luís Filipe Nassif" <>:
>A related question: is it possible to do faceting on a
>using Collation rules? Or faceting is always case sensitive?
>Thanks in advance,
>2017-04-30 12:35 GMT-03:00 Luís Filipe Nassif <>:
>> Hi Lucene community!
>> I can successful get original doc values from fields indexed with
>> SortedDocValues with code like:
>> BytesRef bref = atomicReader.getSortedDocValues(field).get(doc);
>> String value = bref.utf8ToString();
>> But as I need to use locale sorting, I use ICUCollationDocValuesField
>> indexing several fields. But for those fields, the code above does
>> work, the value returned is a lot of unreadable chars. I know it is
>> of the conversion of Strings to CollationKeys done by ICU Collator.
>> Is there a way to convert the returned BytesRef to the original doc
>> Or, in other words, how can I get the original String from an ICU
>> RawCollationKey?
>> Any help will be very appreciated!
>> Thanks Lucene contributors for so great projet!
>> Luis Nassif

Uwe Schindler
Achterdiek 19, 28357 Bremen
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message