title: How make DSL query in ElasticSearch for find points on linestring?
body: <p>I have this SQL query, for getting points on route (array of points)</p>
  <pre><code>SELECT 
      *, 
      ST_AsText(geo) as geo, 
      ST_DISTANCE(ST_GeomFromText('LINESTRING(
  59.855478 30.280684,59.855477 30.280849,59.855477 30.281583,59.855482 30.28191,59.855487 
  30.28226,59.855497 30.28264,59.855513 30.283002,59.855538 30.283477,59.855549 
  30.283783,59.855558 30.284052,59.855566 30.284491,59.855566 30.285036,59.855553 
  30.286345,59.855553 30.286804,59.834255 30.276872,59.834134 30.278136 ........
      )'), geo) * 100 AS distance
  FROM 
      spots
  WHERE 
      category = 1
  HAVING 
      distance &lt; 0.05
  ORDER BY 
      distance 
  </code></pre>
  <p>It works well.</p>
  <p>But I need to write this query in ES, and I don't now how do this.</p>
  <p>Does anybody know how to do something like this?</p>
  <p>Thanks in advance!</p>