mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-7694: Allow setting a prefix for Elasticsearch indexes. (#7500)
This commit is contained in:
committed by
Corey Hulen
parent
7d23276b0c
commit
8bef94d250
@@ -314,7 +314,8 @@
|
||||
"PostIndexReplicas": 1,
|
||||
"PostIndexShards": 1,
|
||||
"AggregatePostsAfterDays": 365,
|
||||
"PostsAggregatorJobStartTime": "03:00"
|
||||
"PostsAggregatorJobStartTime": "03:00",
|
||||
"IndexPrefix": ""
|
||||
},
|
||||
"DataRetentionSettings": {
|
||||
"EnableMessageDeletion": false,
|
||||
|
||||
@@ -138,6 +138,7 @@ const (
|
||||
ELASTICSEARCH_SETTINGS_DEFAULT_POST_INDEX_SHARDS = 1
|
||||
ELASTICSEARCH_SETTINGS_DEFAULT_AGGREGATE_POSTS_AFTER_DAYS = 365
|
||||
ELASTICSEARCH_SETTINGS_DEFAULT_POSTS_AGGREGATOR_JOB_START_TIME = "03:00"
|
||||
ELASTICSEARCH_SETTINGS_DEFAULT_INDEX_PREFIX = ""
|
||||
|
||||
DATA_RETENTION_SETTINGS_DEFAULT_MESSAGE_RETENTION_DAYS = 365
|
||||
DATA_RETENTION_SETTINGS_DEFAULT_FILE_RETENTION_DAYS = 365
|
||||
@@ -482,6 +483,7 @@ type ElasticsearchSettings struct {
|
||||
PostIndexShards *int
|
||||
AggregatePostsAfterDays *int
|
||||
PostsAggregatorJobStartTime *string
|
||||
IndexPrefix *string
|
||||
}
|
||||
|
||||
type DataRetentionSettings struct {
|
||||
@@ -1569,6 +1571,11 @@ func (o *Config) SetDefaults() {
|
||||
*o.ElasticsearchSettings.PostsAggregatorJobStartTime = ELASTICSEARCH_SETTINGS_DEFAULT_POSTS_AGGREGATOR_JOB_START_TIME
|
||||
}
|
||||
|
||||
if o.ElasticsearchSettings.IndexPrefix == nil {
|
||||
o.ElasticsearchSettings.IndexPrefix = new(string)
|
||||
*o.ElasticsearchSettings.IndexPrefix = ELASTICSEARCH_SETTINGS_DEFAULT_INDEX_PREFIX
|
||||
}
|
||||
|
||||
if o.DataRetentionSettings.EnableMessageDeletion == nil {
|
||||
o.DataRetentionSettings.EnableMessageDeletion = new(bool)
|
||||
*o.DataRetentionSettings.EnableMessageDeletion = false
|
||||
|
||||
Reference in New Issue
Block a user