Re: Lucene sort in AaZz order

2019-01-15 Thread Trejkaz
On Wed, Jan 16, 2019 at 2:29 AM Adrien Grand 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 p

Re: Lucene sort in AaZz order

2019-01-15 Thread Adrien Grand
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

Lucene sort in AaZz order

2019-01-15 Thread egorlex
Hi Hi all, i need help with understand how Lucene sort works. This is example how i create sort field. document.add(new SortedDocValuesField("by_name", new BytesRef(family.getName(; And when i make sort by name i get result in this order - azAz, but i need AaZz. Could someone help me wit