Sort value

Hi everyone,

if i have a values:

  • "eee-ccc"

  • "aaa-ttt"

  • "ppp-bbb"

And i want to sort value that has a special character - in the middle of each value. I always get an error while sorting, it's not order from A-Z, Could anyone help me, and provide me the code?

Follow some advices available at About the Elasticsearch category and provide a full script so we can understand what exactly your problem is.

I suspect you are using an old elasticsearch version and doing sorting on a string field. But I can't tell more without details.

Anyway, in 5.x you should use a keyword field type to do the sorting on.

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