Commit 6f452025 by John Dyer Committed by Torkel Ödegaard

Make search support elastic search clusters with _all disabled. Feature is disabled by default

parent b939c02d
......@@ -388,7 +388,13 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
this.elasticsearch_list = function(query,count) {
var request = ejs.Request().indices(config.grafana_index).types('dashboard');
return request.query(
ejs.QueryStringQuery(query || '*')
var q = null;
if(config.elasticsearch_all_disabled){
q = ('title:' + (query || '*'))
}else{
q = (query || '*')
}
ejs.QueryStringQuery(q)
).size(count).doSearch(
// Success
function(result) {
......
......@@ -15,6 +15,7 @@ function (Settings) {
*/
elasticsearch: "http://"+window.location.hostname+":9200",
elasticsearch_all_disabled: false,
/**
* graphite-web url:
* For Basic authentication use: http://username:password@domain.com
......
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