On Wed, Jan 16, 2019 at 2:29 AM Adrien Grand <[email protected]> wrote: > > Assuming that you need case-insensitive sort, the most straightforward > way to do this would be to index the lowercase family name: > SortedDocValuesField("by_name", new > BytesRef(family.getName().toLowerCase(Local.ROOT))). > > It is also possible to implement a custom FieldComparatorSource, but > this will likely be both more complicated and slower.
Probably actually want to use toUpperCase(Locale.ROOT).toLowerCase(Locale.ROOT), and possibly even a Normalizer.normalize before that. Unless you can use ICU's normaliser with built-in case folding, which simplifies it a lot. TX --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
