Reindex reindexes a Crawler. It returns the Task ID if successful.
(crawlerID string)
| 258 | // Reindex reindexes a Crawler. |
| 259 | // It returns the Task ID if successful. |
| 260 | func (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. |
| 273 | func (c *Client) Stats(crawlerID string) (*StatsResponse, error) { |
no test coverage detected