Rebuild channel index (#26080)
* WIP * Added rebuild channels index functionality * Added rough logic to send message to all sysadmins * WIP * WIP * WIP * Cleanup * i18n fix * reading through all pages of system admins * Fixed webapp style * i18n fix * Added help text * i18n fix * i18n update * Updated system console button action * Updated snapshots * some cleanup * Updated snapshot * Update server/channels/app/server.go Co-authored-by: Daniel Espino García <larkox@gmail.com> * fixed typo * Refactoring to improve readibility * moved index check to API later during config update * Added some docs * Updated get system bot --------- Co-authored-by: Daniel Espino García <larkox@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ccc00b9077
Коммит
774df37464
@@ -292,6 +292,10 @@ func (b *BleveEngine) PurgeIndexes(rctx request.CTX) *model.AppError {
|
||||
return b.openIndexes()
|
||||
}
|
||||
|
||||
func (b *BleveEngine) PurgeIndexList(rctx request.CTX, indexes []string) *model.AppError {
|
||||
return model.NewAppError("Bleve.PurgeIndex", "bleveengine.purge_list.not_implemented", nil, "not implemented", http.StatusNotFound)
|
||||
}
|
||||
|
||||
func (b *BleveEngine) DataRetentionDeleteIndexes(rctx request.CTX, cutoff time.Time) *model.AppError {
|
||||
return nil
|
||||
}
|
||||
@@ -331,3 +335,7 @@ func (b *BleveEngine) UpdateConfig(cfg *model.Config) {
|
||||
}
|
||||
b.cfg = cfg
|
||||
}
|
||||
|
||||
func (b *BleveEngine) IsChannelsIndexVerified() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ type SearchEngineInterface interface {
|
||||
DeleteFilesBatch(rctx request.CTX, endTime, limit int64) *model.AppError
|
||||
TestConfig(rctx request.CTX, cfg *model.Config) *model.AppError
|
||||
PurgeIndexes(rctx request.CTX) *model.AppError
|
||||
PurgeIndexList(rctx request.CTX, indexes []string) *model.AppError
|
||||
RefreshIndexes(rctx request.CTX) *model.AppError
|
||||
DataRetentionDeleteIndexes(rctx request.CTX, cutoff time.Time) *model.AppError
|
||||
IsChannelsIndexVerified() bool
|
||||
}
|
||||
|
||||
@@ -327,6 +327,20 @@ func (_m *SearchEngineInterface) IsAutocompletionEnabled() bool {
|
||||
return r0
|
||||
}
|
||||
|
||||
// IsChannelsIndexVerified provides a mock function with given fields:
|
||||
func (_m *SearchEngineInterface) IsChannelsIndexVerified() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// IsEnabled provides a mock function with given fields:
|
||||
func (_m *SearchEngineInterface) IsEnabled() bool {
|
||||
ret := _m.Called()
|
||||
@@ -383,6 +397,22 @@ func (_m *SearchEngineInterface) IsSearchEnabled() bool {
|
||||
return r0
|
||||
}
|
||||
|
||||
// PurgeIndexList provides a mock function with given fields: rctx, indexes
|
||||
func (_m *SearchEngineInterface) PurgeIndexList(rctx request.CTX, indexes []string) *model.AppError {
|
||||
ret := _m.Called(rctx, indexes)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, []string) *model.AppError); ok {
|
||||
r0 = rf(rctx, indexes)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// PurgeIndexes provides a mock function with given fields: rctx
|
||||
func (_m *SearchEngineInterface) PurgeIndexes(rctx request.CTX) *model.AppError {
|
||||
ret := _m.Called(rctx)
|
||||
|
||||
Ссылка в новой задаче
Block a user