如何在Sourcegraph上按文件类型过滤?

时间:2018-08-06 19:03:09

标签: sourcegraph

我想进行Sourcegraph搜索,并只显示具有特定扩展名的文件的结果。

1 个答案:

答案 0 :(得分:1)

您可以使用df.assign(count = df.unigrams.apply(lambda x: len(set(x)))) label unigrams count 0 ham [ive, searching, right, word, thank, breather,...] 9 1 spam [free, entry, 2, wkly, comp, win, fa, cup, fin...] 12 令牌按文件名正则表达式过滤结果。例如,file:\.go$ would limit results to files ending in ".go"

完整的搜索查询语法记录在这里:https://about.sourcegraph.com/docs/search/query-syntax

相关问题