MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / ClearIndex

Function ClearIndex

server/handles/index.go:108–121  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

106}
107
108func ClearIndex(c *gin.Context) {
109 if search.Running() {
110 common.ErrorStrResp(c, "index is running", 400)
111 return
112 }
113 search.Clear(c)
114 search.WriteProgress(&model.IndexProgress{
115 ObjCount: 0,
116 IsDone: true,
117 LastDoneTime: nil,
118 Error: "",
119 })
120 common.SuccessResp(c)
121}
122
123func GetProgress(c *gin.Context) {
124 progress, err := search.Progress()

Callers

nothing calls this directly

Calls 5

RunningFunction · 0.92
ErrorStrRespFunction · 0.92
ClearFunction · 0.92
WriteProgressFunction · 0.92
SuccessRespFunction · 0.92

Tested by

no test coverage detected