Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoekt-indexserver: Support Per-Repository Branch Selection #432

Open
dharesign opened this issue Sep 29, 2022 · 7 comments
Open

zoekt-indexserver: Support Per-Repository Branch Selection #432

dharesign opened this issue Sep 29, 2022 · 7 comments

Comments

@dharesign
Copy link

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!

@keegancsmith
Copy link
Member

This seems like a reasonable feature request. Happy to review / help out with direction on a PR that adds this.

@notquiteleo
Copy link

成员

I'm generating index files for multiple branches under the same project. Is incremental indexing also valid?

@keegancsmith
Copy link
Member

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.

@notquiteleo
Copy link

我正在为同一项目下的多个分支生成索引文件。增量索引也有效吗?

增量索引确实有效,我们在一些选定的存储库上运行它。然而,我们从未对其进行最后的修改以使其普遍可用。仅当您拥有大型存储库并且希望避免在这些情况下建立索引的成本时,我才会考虑使用它。否则,批量索引的简单性更有意义。

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.

@keegancsmith
Copy link
Member

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.

@notquiteleo
Copy link

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.

@keegancsmith
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants