MCPcopy Create free account
hub / github.com/algolia/cli / Reindex

Method Reindex

api/crawler/client.go:260–270  ·  view source on GitHub ↗

Reindex reindexes a Crawler. It returns the Task ID if successful.

(crawlerID string)

Source from the content-addressed store, hash-verified

258// Reindex reindexes a Crawler.
259// It returns the Task ID if successful.
260func (c *Client) Reindex(crawlerID string) (string, error) {
261 var res TaskIDResponse
262 path := fmt.Sprintf("crawlers/%s/reindex", crawlerID)
263
264 err := c.request(&res, http.MethodPost, path, nil, nil)
265 if err != nil {
266 return "", err
267 }
268
269 return res.TaskID, nil
270}
271
272// Stats gets the stats of a Crawler.
273func (c *Client) Stats(crawlerID string) (*StatsResponse, error) {

Callers 2

runReindexCmdFunction · 0.80
runPauseCmdFunction · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected