Skip to content

Commit

Permalink
Merge pull request jettro#14 from poros/highlights
Browse files Browse the repository at this point in the history
Low score for irc_logs in simple search
  • Loading branch information
ENuge committed Jul 25, 2014
2 parents 9cd295f + 6b7801e commit 3be4328
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ function SearchCtrl($scope, $sce, $routeParams, $location, elastic, configuratio
executedQuery = constructQuery(tree);

} else if ($scope.search.simple && $scope.search.simple.length > 0) {
executedQuery = {"query_string": {"query": $scope.search.simple, "fields": ["_all"], "use_dis_max": true}};
var functions = [{"filter": {"type": {"value": "irc_log"}}, "boost_factor": 0.25}];
executedQuery = {"function_score": {"query": {"query_string": {"query": $scope.search.simple, "fields": ["_all"], "use_dis_max": true}},"functions":functions}};
} else {
executedQuery = {"matchAll": {}};
}
Expand Down

0 comments on commit 3be4328

Please sign in to comment.