diff --git a/api/internal/crawl/crawler/github/crawler.go b/api/internal/crawl/crawler/github/crawler.go index 15ff0d73b..441bdc0d8 100644 --- a/api/internal/crawl/crawler/github/crawler.go +++ b/api/internal/crawl/crawler/github/crawler.go @@ -102,14 +102,16 @@ func (gc githubCrawler) Crawl(ctx context.Context, queryResult.errorCnt += result.errorCnt } - if len(errs) > 0 { - return errs - } logger.Printf("Summary of Crawl: got %d files from Github. "+ "%d have been seen before. %d are new and sent to the output channel." + "%d have kustomizationResultAdapter errors.", queryResult.totalDocCnt, queryResult.seenDocCnt, queryResult.newDocCnt, queryResult.errorCnt) + + if len(errs) > 0 { + return errs + } + return nil } diff --git a/api/internal/crawl/search_cmds/keyword_search.md b/api/internal/crawl/search_cmds/keyword_search.md index db703e91a..e3c152d00 100644 --- a/api/internal/crawl/search_cmds/keyword_search.md +++ b/api/internal/crawl/search_cmds/keyword_search.md @@ -63,4 +63,20 @@ curl -X GET "${ElasticSearchURL}:9200/kustomize/_search?pretty" -H 'Content-Type } } ' +``` + +Search all the documents whose filePath does not end with any of these following +three filenames: `kustomization.yaml`, `kustomization.yml`, `kustomization`: +``` +curl -X GET "${ElasticSearchURL}:9200/kustomize/_search?pretty" -H 'Content-Type: application/json' -d' +{ + "query": { + "bool": { + "must_not": [ + { "regexp": { "filePath": ".*/kustomization((.yaml)?|(.yml)?)/*" }} + ] + } + } +} +' ``` \ No newline at end of file