// Generated from search-request-sort_edae616e1244babf6032aecc6aaaf836_test.go
//
[source, go]
----
res, err := es.Search(
	es.Search.WithBody(strings.NewReader(`{
	  "sort": [
	    {
	      "_geo_distance": {
	        "pin.location": {
	          "lat": 40,
	          "lon": -70
	        },
	        "order": "asc",
	        "unit": "km"
	      }
	    }
	  ],
	  "query": {
	    "term": {
	      "user": "kimchy"
	    }
	  }
	}`)),
	es.Search.WithPretty(),
)
fmt.Println(res, err)
----
