Lucene sorting uses always english locale
Bug #715617 reported by
Lassi Immonen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Querydsl |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Lucene sort does not work correctly for different than english locales
This fails:
createDoc("1", "Ä", fi);
createDoc("2", "B", fi);
createDoc("3", "A", fi);
List<Dto> dtos = dao.getAll(fi);
assertEquals("3", dtos.get(
assertEquals("2", dtos.get(1).getId() );
assertEquals("1", dtos.get(
To post a comment you must log in.
Added new constructor parameter to LuceneSerializer:
public LuceneSerialize r(boolean lowerCase, boolean splitTerms, Locale sortLocale)
which is used in sort field generation:
sorts.add(new SortField( toField( path), sortLocale, reverse));
In the future we might want to add support to set sort locale per field, but I think it can wait until a real use case emerges.