lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luís Filipe Nassif <lfcnas...@gmail.com>
Subject Get original DocValues from ICUCollationDocValuesField
Date Sun, 30 Apr 2017 15:35:34 GMT
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 for
indexing several fields. But for those fields, the code above does not
work, the value returned is a lot of unreadable chars. I know it is because
of the conversion of Strings to CollationKeys done by ICU Collator.

Is there a way to convert the returned BytesRef to the original doc value?
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message