zoekt-indexserver: Support Per-Repository Branch Selection
I'm using zoekt-indexserver to clone and index a bunch of GitHub repositories. For the most part, it is the default branch that I am interested in indexing, but there is one repository where this is not the case.
It would be great if I had a way to specify the branch to index.
It seems like zoekt-git-index supports being given the branch information, but there's only a single string that can be provided for the zoekt-indexserver invocation, rather than a per-repository setting.
Something like:
{ "GithubOrg": "foo", "Name": "^bar$", "GitHubURL": "https://github.com", "branch": "release" }
Thanks!
This seems like a reasonable feature request. Happy to review / help out with direction on a PR that adds this.
成员
I'm generating index files for multiple branches under the same project. Is incremental indexing also valid?
I'm generating index files for multiple branches under the same project. Is incremental indexing also valid?
Incremental indexing does work and we run it on a few select repos. However, we never did the final touches on it to make it generally available. I'd consider using it only if you have a large repo and want to avoid the cost of indexing in those cases. Otherwise the simplicity of batch indexing makes more sense.
我正在为同一项目下的多个分支生成索引文件。增量索引也有效吗?
增量索引确实有效,我们在一些选定的存储库上运行它。然而,我们从未对其进行最后的修改以使其普遍可用。仅当您拥有大型存储库并且希望避免在这些情况下建立索引的成本时,我才会考虑使用它。否则,批量索引的简单性更有意义。
For new branches, do you use rebuilding the index file or increment? We are looking for incremental ways to do this. For large projects, the cost of rebuilding the index while considering real-time performance is too high.
Zoekt requires a full reindexing if you change the set of branches. I'm not sure if zoekt suits your use case. Taking a step back, there may be ways to adapt zoekt to suit your use case, but to be honest I'm not sure what your use case actually is.
Zoekt requires a full reindexing if you change the set of branches. I'm not sure if zoekt suits your use case. Taking a step back, there may be ways to adapt zoekt to suit your use case, but to be honest I'm not sure what your use case actually is.
Thanks. I recently encountered a problem. If the branch name and tag are consistent, there will be a bug that the code cannot be searched. I would like to know if you have tried building an index for the tag.
I'm not exactly sure what your bug is, but from a fundemental perspective on how zoekt works it doesn't matter branches vs tags. So if you have a reproduction it should be easy to fix.