diff --git a/server.go b/server.go index 3c5e715..59b4864 100644 --- a/server.go +++ b/server.go @@ -61,14 +61,14 @@ func executeQuery(rw http.ResponseWriter, req *http.Request) { Records: make([]jsonRecord, 0)} for name, value := range features { - column := jsonColumn{Value: value, Steps: request.HintSteps} + column := jsonColumn{Value: value, Steps: request.Resolution} hints := project( entries, features, name, request.MinScore, - request.HintSteps) + request.Resolution) for _, hint := range hints { jsonHint := jsonProjection{hint.compatibility, hint.count, hint.sample} diff --git a/static/index.html b/static/index.html index 574d97c..c917adf 100644 --- a/static/index.html +++ b/static/index.html @@ -55,8 +55,8 @@
- - + +
diff --git a/static/scripts/search.js b/static/scripts/search.js index f1683f0..74bfccc 100644 --- a/static/scripts/search.js +++ b/static/scripts/search.js @@ -46,7 +46,7 @@ return parseFloat(options.fn(this)).toFixed(precision); }); - $('#minScore,#hintSteps,#walkingDist,#maxResults').change(onSearch); + $('#minScore,#resolution,#walkingDist,#maxResults').change(onSearch); $('#profileDlg').on('hidden.bs.modal', onSearch); $('#resetStorage').click(function() { if (confirm('Are you sure you want to reset your profile?')) { @@ -82,7 +82,7 @@ profile: getProfile(), walkingDist: parseFloat($('#walkingDist').val()), minScore: parseFloat($('#minScore').val()), - hintSteps: parseInt($('#hintSteps').val()), + resolution: parseInt($('#resolution').val()), maxResults: parseInt($('#maxResults').val()) }; diff --git a/types.go b/types.go index 05dfa4a..cdcc3e0 100644 --- a/types.go +++ b/types.go @@ -39,10 +39,10 @@ type jsonGeoData struct { type jsonQueryRequest struct { Features featureMap `json:"features"` Geo *jsonGeoData `json:"geo"` - HintSteps int `json:"hintSteps"` MaxResults int `json:"maxResults"` MinScore float64 `json:"minScore"` Profile featureMap `json:"profile"` + Resolution int `json:"resolution"` SortAsc bool `json:"sortAsc"` SortKey string `json:"sortKey"` WalkingDist float64 `json:"walkingDist"`