How can I sort alphabetical with Norwegian / Scandinavian letters properly?

Hi!

Are there any updates on the possibility to change the alphabetical sorting logic?

As a Norwegian, I rely on proper sorting of the characters Æ,Ø, Å. These are at the moment not sorted properly (example: Å appears at the top, but it should appear at the bottom when sorted alphabetical)

I have noticed a few other related topics, like: Scandinavian special characters are not counted as typos

But as far as I can see, this did not get resolved.

Are there any was to change the sorting so that these characters can appear in the right order?

Thanks!

Hi @yodawg,

Can you provide more information on what you are trying to sort? If you are trying to sort your records alphabetically, you may be interested in this documentation. Please note the caveat at the end about diacritics.

Hi, and thanks for the quick reply.

I am currently sorting my objects by “title” ascending. However, some of the titles starts with, say, the letter “Å”. In the Norwegian alphabet, the character Å occurs last, thus I want the titles that starts with “Å” to appear last. Currently it appears at the top together with the "A"s, which is not correct.

Hope this clarifies.

Hi @yodawg,

While sorting alphabetically makes sense for a database, it doesn’t for a search engine and we strongly discourage it . This isn’t to say your use case is invalid; rather, we want to encourage caution and due consideration.

When you sort your data alphabetically, you don’t only devalue Algolia’s tie-breaking algorithm: you essentially disable it . If you sort alphabetically first, then the only objects requiring tie-breaking are those with the exact same name: there will likely be few objects that fit this criterea.

Alphabetically structured results lead users to search through data by hand, while a search engine, like Algolia, should ensure that they don’t need to.

Algolia is not locale-aware. Strings are ordered by lexicographical order of their Unicode characters. That may be acceptable for English text, less so for other languages (especially those with diacritics).

With this in mind, we probably won’t be adding the functionality to sort with diacritics.