Sorting not working properly

Hi
I have problem with sorting imn ELK 7.3.
My query: https://pastebin.com/uK4Ywrec
for mapping: https://pastebin.com/fZ4eyhtm
and index settings https://pastebin.com/X4SiecP8
For this query and mapping uI'm getting such order:
Benny G
Finn S. Hansen
Henrik Mårtensson
Jan Hjort Friderichsen
ista Nykøbing

And in such case proper order should be:
Benny G
Finn S. Hansen
Henrik Mårtensson
ista Nykøbing
Jan Hjort Friderichsen

What is not working? What is the error? What were you expecting and what are you getting?

Inproper order for pasted query:
Benny G
Finn S. Hansen
Henrik Mårtensson
Jan Hjort Friderichsen
ista Nykøbing

And in such case proper order should be:
Benny G
Finn S. Hansen
Henrik Mårtensson
ista Nykøbing
Jan Hjort Friderichsen

Strings are sorted based on lexicographical order. If you look at the ASCII table upper and lower case characters are arranged in separate blocks meaning that a lower case character is always considered higher than an upper case character. What you are seeing is therefore expected. To get it sorted the way you want, which is basically a case-insensitive sort, you may need to create a lower cased subfield (or create a custom analyzer for the keyword field) to sort by, although there may be other solutions I am not aware of.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.