How to do case insensitive sorting of Norwegian characters (Æ, Ø, and Å) using Hibernate Lucene Search?

前端 未结 2 955
说谎
说谎 2021-01-18 09:01

æ, ø, å are latest letters in the norwegian alphabet

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Æ Ø Å

When we try to sort it usin

2条回答
  •  无人及你
    2021-01-18 09:51

    I must admit it's not something common. As far as I can see, there is a Lucene module which uses ICU for locale dependent sorting.

    See the lucene-icu artifact and especially the ICUCollationKeyFilter and ICUCollationKeyAnalyzer (the analyzer is a KeywordTokenizer with the filter). You will need to create the factory necessary to use it with Hibernate Search but it should be quite easy.

    Can't really promise it will work but it's probably your best bet.

提交回复
热议问题