Commit ac24a06d by Nikolay Bryskin

derivequeries: combine derived query with original query using brackets

parent a0350103
......@@ -85,9 +85,9 @@ angular.module('kibana.derivequeries', [])
if ($scope.panel.query === '' || $scope.panel.mode === 'terms only') {
var suffix = '';
} else if ($scope.panel.mode === 'AND') {
var suffix = ' AND ' + $scope.panel.query;
var suffix = ' AND (' + $scope.panel.query + ')';
} else if ($scope.panel.mode === 'OR') {
var suffix = ' OR ' + $scope.panel.query;
var suffix = ' OR (' + $scope.panel.query + ')';
}
_.each(results.facets.query.terms, function(v) {
data.push($scope.panel.field+':"'+v.term+'"'+suffix)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment