1
This commit is contained in:
Alex Yatskov 2015-03-25 19:53:53 +09:00
parent 40dea1929b
commit f075c21333

View File

@ -44,7 +44,7 @@ func executeQuery(rw http.ResponseWriter, req *http.Request) {
var geo *geoContext var geo *geoContext
if request.Geo != nil { if request.Geo != nil {
geo = &geoContext{latitude: request.Geo.Latitude, longitude: request.Geo.Longitude} geo = &geoContext{request.Geo.Latitude, request.Geo.Longitude}
} }
entries := getRecords(queryContext{geo, request.Profile, request.WalkingDist}) entries := getRecords(queryContext{geo, request.Profile, request.WalkingDist})
@ -64,13 +64,13 @@ func executeQuery(rw http.ResponseWriter, req *http.Request) {
features, features,
name, name,
request.MinScore, request.MinScore,
queryBounds{min: request.Range.Min, max: request.Range.Max}, queryBounds{request.Range.Min, request.Range.Max},
request.HintSteps) request.HintSteps)
for _, hint := range hints { for _, hint := range hints {
jsonHint := jsonProjection{ jsonHint := jsonProjection{
Sample: hint.sample, Sample: hint.sample,
Stats: jsonStats{Count: hint.stats.count, Compatibility: hint.stats.compatibility}} Stats: jsonStats{hint.stats.compatibility, hint.stats.count}}
column.Hints = append(column.Hints, jsonHint) column.Hints = append(column.Hints, jsonHint)
} }