[MM-23535] Add disable database search flag and return empty posts results if set (#14245)
* [MM-23535] Add disable database search flag and return empty posts results if set * Add UpdateConfig function for the SearchStore and hook it into the app lifecycle * Add the config listener in the server instance instead of using FakeApp * Instantiate searchlayer as a pointer to avoid passing around copies of it
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
288ed40e8f
Коммит
4fde004a5b
@@ -970,6 +970,7 @@ type SqlSettings struct {
|
||||
Trace *bool `restricted:"true"`
|
||||
AtRestEncryptKey *string `restricted:"true"`
|
||||
QueryTimeout *int `restricted:"true"`
|
||||
DisableDatabaseSearch *bool `restricted:"true"`
|
||||
}
|
||||
|
||||
func (s *SqlSettings) SetDefaults(isUpdate bool) {
|
||||
@@ -1018,6 +1019,10 @@ func (s *SqlSettings) SetDefaults(isUpdate bool) {
|
||||
if s.QueryTimeout == nil {
|
||||
s.QueryTimeout = NewInt(30)
|
||||
}
|
||||
|
||||
if s.DisableDatabaseSearch == nil {
|
||||
s.DisableDatabaseSearch = NewBool(false)
|
||||
}
|
||||
}
|
||||
|
||||
type LogSettings struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user