Rebasing minScore depending on number of keywords, fixing bugs
This commit is contained in:
parent
0a552504f4
commit
a7fc6c1762
@ -48,7 +48,10 @@
|
|||||||
|
|
||||||
outputResults(results.items, params.maxResults);
|
outputResults(results.items, params.maxResults);
|
||||||
|
|
||||||
$('#query').text(params.keywords.join(', '));
|
if (params.keywords) {
|
||||||
|
$('#query').text(params.keywords.join(', '));
|
||||||
|
}
|
||||||
|
|
||||||
$('#useLocalScale').click(function() {
|
$('#useLocalScale').click(function() {
|
||||||
var useLocalScale = $('#useLocalScale').is(':checked');
|
var useLocalScale = $('#useLocalScale').is(':checked');
|
||||||
ctx.grapher.setUseLocalScale(useLocalScale);
|
ctx.grapher.setUseLocalScale(useLocalScale);
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="minScore" class="col-md-2 control-label">Minimum score</label>
|
<label for="minScore" class="col-md-2 control-label">Minimum score</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input class="form-control" type="number" step="any" value="1.0" id="minScore" name="minScore">
|
<input class="form-control" type="number" step="any" value="0.25" id="minScore" name="minScore">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -138,7 +138,7 @@ module.exports.execQuery = function(query) {
|
|||||||
|
|
||||||
var searchResults = findData(
|
var searchResults = findData(
|
||||||
query.searchParams,
|
query.searchParams,
|
||||||
query.minScore,
|
query.minScore * _.keys(query.searchParams).length,
|
||||||
query.maxResults
|
query.maxResults
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ module.exports.execQuery = function(query) {
|
|||||||
for (var keyword in query.searchParams) {
|
for (var keyword in query.searchParams) {
|
||||||
var searchHints = searchBuildHints(
|
var searchHints = searchBuildHints(
|
||||||
query.searchParams,
|
query.searchParams,
|
||||||
query.minScore,
|
query.minScore * _.keys(query.searchParams).length,
|
||||||
keyword,
|
keyword,
|
||||||
query.searchRange,
|
query.searchRange,
|
||||||
query.hintSteps
|
query.hintSteps
|
||||||
|
Loading…
Reference in New Issue
Block a user