mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Make search support elastic search clusters with _all disabled. Feature is disabled by default
This commit is contained in:
committed by
Torkel Ödegaard
parent
b939c02da0
commit
6f4520254b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user