func (si SearchIndex) DeleteFeed(feed content.Feed) error { articles := feed.AllArticles() if !feed.HasErr() { si.logger.Infof("Removing all articles from the search index for feed '%s'\n", feed) si.batchDelete(articles) } else { return feed.Err() } return nil }
func (i Index) FeedDeleted(feed content.Feed) error { i.logger.Infof("Deleting article search index for feed '%s'\n", feed) articles := feed.AllArticles() if feed.HasErr() { return fmt.Errorf("Error deleting all articles of %s from the search index: %v\n", feed, feed.Err()) } else { i.logger.Infof("Deleting article search index for feed '%s'\n", feed) return i.provider.BatchIndex(articles, data.BatchDelete) } }