Search code examples
sortingelasticsearchopensearch

Sort by long numbers, longer than Long data type


I have got numbers such as the following

  • 14943946763064166065064222914309811179884629895193213215294437936375446976774

I want to sort by numbers of the same length, I have tried Long and Keyword mapping types but nothing worked.


Solution

  • For anyone that end up here, I used Double data type and it worked well