Script based sorting

hi lets asume that in SQL you select your data with this order

ORDER BY 1000 * round((if (Age>22,(Age-22),(22-Age))+1)/2)-Profil ASC

since im rewriting my search process to elasticsearch and i want to preserve
all functionallity i have to get this right. but im going totally blind here with this
sort order. any help would be really appreciated

You can use sort by script (Elasticsearch Platform — Find real-time answers at scale | Elastic) to get that. But, going in the way of trying to replace an RDBMs functionality with elasticsearch is the wrong way to try and use elasticsearch.
On Thursday, February 17, 2011 at 3:44 PM, nabizan wrote:

hi lets asume that in SQL you select your data with this order

ORDER BY 1000 * round((if (Age>22,(Age-22),(22-Age))+1)/2)-Profil ASC

since im rewriting my search process to elasticsearch and i want to preserve
all functionallity i have to get this right. but im going totally blind here
with this
sort order. any help would be really appreciated

View this message in context: http://elasticsearch-users.115913.n3.nabble.com/script-based-sorting-tp2519175p2519175.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

okej but could you help me a little more here? i have no idea how to write this particular script sort ... i have to preserve all the functionality. thanks