[MM-15811] Adds fallback mechanism for elasticsearch queries (#11065)
* [MM-15811] Adds fallback mechanism for elasticsearch queries * Rename config helpers
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4c075e45f4
Коммит
406dcb1311
@@ -399,3 +399,19 @@ func (a *App) SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bo
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) IsESIndexingEnabled() bool {
|
||||
return a.Elasticsearch != nil && *a.Config().ElasticsearchSettings.EnableIndexing
|
||||
}
|
||||
|
||||
func (a *App) IsESSearchEnabled() bool {
|
||||
esInterface := a.Elasticsearch
|
||||
license := a.License()
|
||||
return esInterface != nil && *a.Config().ElasticsearchSettings.EnableSearching && license != nil && *license.Features.Elasticsearch
|
||||
}
|
||||
|
||||
func (a *App) IsESAutocompletionEnabled() bool {
|
||||
esInterface := a.Elasticsearch
|
||||
license := a.License()
|
||||
return esInterface != nil && *a.Config().ElasticsearchSettings.EnableAutocomplete && license != nil && *license.Features.Elasticsearch
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user