Rebuild search index in admin options (#647)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
This commit is contained in:
@@ -150,7 +150,12 @@ func resetHooks() {
|
||||
}
|
||||
|
||||
func indexGists() {
|
||||
log.Info().Msg("Indexing all Gists...")
|
||||
log.Info().Msg("Rebuilding index from scratch...")
|
||||
if err := index.ResetIndex(); err != nil {
|
||||
log.Error().Err(err).Msg("Cannot reset index")
|
||||
return
|
||||
}
|
||||
|
||||
gists, err := db.GetAllGistsRows()
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("Cannot get gists")
|
||||
|
||||
Reference in New Issue
Block a user