D
D
Drum Kit2015-12-19 10:40:38
elasticsearch
Drum Kit, 2015-12-19 10:40:38

How to write a script in elasticsearch?

Good afternoon.
I need to do a search using a mathematical formula.
here is the sql that needs to be implemented on elasticsearch


SELECT id,`latitude`,`longitude`, (((ACOS(SIN(44.4609123 * PI() / 180) * SIN(`latitude` * PI() / 180) +
COS(44.4609123 * PI() / 180) * COS(`latitude` * PI() / 180) * COS((34.1463064 - `longitude`) *
PI() / 180)) * 180 / PI()) * 60 * 1.1515))/0.62137 AS distance
FROM ` mapCordinateTest`
HAVING distance<= '60' ORDER BY distance ASC;

I read there are scripting languages, but which one to use and you can send documentation of the use and api of the language.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2015-12-24
@MaxDukov

Help you or do it for you? it is logical to look for documentation on the elastic itself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question