title: Elasticsearch - sort by geo distance with gauss decay function
body: <p>"location" is a geo_point field that I have mapped correctly.
  Should I explicitly tell elasticsearch to sort by distance? 
  The response shows that all documents have the same score "1".</p>
  
  <p>If there are documents with geo_point ("location" field in my example)
  that is empty: lat lon 0.0000 0.0000 - will this brake all scores?
  This is in the documentation (<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html</a>)</p>
  
  <blockquote>
    <p>geo distance sorting does not support configurable missing values: the distance will always be considered equal to Infinity when a document does not have values for the field that is used for distance computation.</p>
  </blockquote>
  
  <p>Should I understand it like that: "the distance will always by considered equal to Infinity <strong>FOR ALL RESULTS</strong> when a <strong>SINGLE</strong> document does not have values for the field... ? So one document with bad data renders the whole search result useless???</p>
  
  <pre><code>GET users/users/_search
  {
    "explain": true, 
     "query": {
       "function_score": {
         "gauss": {
           "location": {
             "origin": [-34.60368, -58.38156],
             "scale": "5km",
             "offset": "2km"
           }
         }
       }
     }
  }
  </code></pre>
  
  <p>Another attempt:</p>
  
  <pre><code>{
    "explain": true,
    "sort": [
      {
        "_geo_distance": {
          "location": {
            "lat": -34.60368,
            "lon": -58.38156
          },
          "order": "desc"
        }
      }
    ]
  }
  </code></pre>
  
  <p>The response explains the sorting as infinity:
  and all scores are "null":</p>
  
  <pre><code>    "total": 1643,
      "max_score": null,
  "sort": [
            "Infinity"
          ]
  </code></pre>
  
  <p><br></p>
  
  <p>Should I combine the gauss decay function and the sort from the 2 examples above?</p>