title: Elastic search geo point query filter
body: <p>I am trying to use geo_point for distance but it always shows location type double not geo_point how can I set location mapped to geo_point . </p>
  
  <p>Actually I have to find all records within 5km sorted.</p>
  
  <pre><code> "pin" : {
               "properties" : {
               "location" : {
               "properties" : {
               "lat" : {
               "type" : "double"
               },
                   "lon" : {
                   "type" : "double"
                   }
                }
                },
                    "type" : {
                    "type" : "string"
                    }
                }
                },
  </code></pre>
  
  <p>and when I am trying searches with this query below to find result within 5km of delhi lat long : </p>
  
  <pre><code> {
            "query": {
              "filtered": {
                "query": {
                  "match_all": {}
                },
                "filter": {
                  "pin": {
                    "distance": "5",
                    "distance_unit": "km",
                    "coordinate": {
                      "lat": 28.5402707,
                      "lon": 77.2289643
                    }
                  }
                }
              }
            }
          }
  </code></pre>
  
  <p>It shows me error query_parsing_exception and No query registered for [pin]. I cannot figure out the problem. It always throws this exception</p>
  
  <pre><code>  {
  
              "error": {
                  "root_cause": [
                      {
                          "type": "query_parsing_exception",
                          "reason": "No query registered for [pin]",
                          "index": "find_index",
                          "line": 1,
                          "col": 58
                      }
                  ],
                  "type": "search_phase_execution_exception",
                  "reason": "all shards failed",
                  "phase": "query",
                  "grouped": true,
                  "failed_shards": [
                      {
                          "shard": 0,
                          "index": "find_index",
                          "node": "DtpkEdLCSZCr8r2bTd8p5w",
                          "reason": {
                              "type": "query_parsing_exception",
                              "reason": "No query registered for [pin]",
                              "index": "find_index",
                              "line": 1,
                              "col": 58
                          }
                      }
                  ]
              },
              "status": 400
  
          }
  </code></pre>
  
  <p>Please help me to figure out this problem. how can I set geo_point and solve this exception error and status 400 and all_shards_failed error</p>