MM-53962: Adding ES8 dependency (#24399)
* Adding ES8 dependency ```release-note NONE ``` Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a695a755f6
Коммит
177389d224
@@ -205,6 +205,8 @@ const (
|
||||
ElasticsearchSettingsDefaultLiveIndexingBatchSize = 1
|
||||
ElasticsearchSettingsDefaultRequestTimeoutSeconds = 30
|
||||
ElasticsearchSettingsDefaultBatchSize = 10000
|
||||
ElasticsearchSettingsESBackend = "elasticsearch"
|
||||
ElasticsearchSettingsOSBackend = "opensearch"
|
||||
|
||||
BleveSettingsDefaultIndexDir = ""
|
||||
BleveSettingsDefaultBatchSize = 10000
|
||||
@@ -2763,6 +2765,7 @@ func (s *NativeAppSettings) SetDefaults() {
|
||||
|
||||
type ElasticsearchSettings struct {
|
||||
ConnectionURL *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"`
|
||||
Backend *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"`
|
||||
Username *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"`
|
||||
Password *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"`
|
||||
EnableIndexing *bool `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"`
|
||||
@@ -2795,6 +2798,10 @@ func (s *ElasticsearchSettings) SetDefaults() {
|
||||
s.ConnectionURL = NewString(ElasticsearchSettingsDefaultConnectionURL)
|
||||
}
|
||||
|
||||
if s.Backend == nil {
|
||||
s.Backend = NewString(ElasticsearchSettingsESBackend)
|
||||
}
|
||||
|
||||
if s.Username == nil {
|
||||
s.Username = NewString(ElasticsearchSettingsDefaultUsername)
|
||||
}
|
||||
@@ -4173,6 +4180,10 @@ func (s *ElasticsearchSettings) isValid() *AppError {
|
||||
}
|
||||
}
|
||||
|
||||
if *s.Backend != ElasticsearchSettingsOSBackend && *s.Backend != ElasticsearchSettingsESBackend {
|
||||
return NewAppError("Config.IsValid", "model.config.is_valid.elastic_search.invalid_backend.app_error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user