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
Support multiple file search #13
Comments
|
This feature will be supported it in the near future, I need to think about how to do it... |
|
🚀🚀🚀 |
|
@conwnet is someone working on this issue? If not I'd like to contribute |
Thank you, it hasn't started yet, how do you want to do this? I read the documentation of Search Code, It seems only default branch are supported by this API. Sure, search supported for the default branch also is a lot of help. For other branch, we can only search text in the files which we have already cache it. Another way is we use GraphQL API to fetch all files' content, should we? |
|
I did go through the Search code's documentation as well and you're right there. How would you use GraphQL API for this? |
Use the GraphQL API to get contents of all files...😂 It's just a guess, the performance is too low in this way. |
|
Yes I think so too. Is there a community for this repo like slack or discord or something where we can discuss? |
thanks, good idea~ I create an community here https://gitter.im/conwnet/github1s |
@xcv58 Please Join This Community for discussion :) |
|
Sourcegraph's public API (which can index any public repository on demand) might be a great solution here; it supports regexes and case sensitivity, provides line numbers and offsets, and even allows searching across repos if multi-repo projects were ever something we wanted to support! Link to a live search with capabilities highlighted (press the Play button at top to run) |
Does Sourcegraph's public API support all public repo? |
Wouldn't using this API require the generation of access token doing GitHub auth? https://docs.sourcegraph.com/api/graphql#quickstart |
I don't believe so. From what I can tell the Sourcegraph documentation is tailored for people running it on their on infrastructure against private repos. But their public instance, which works on public repositories, doesn't require any auth. The following command will work, for instance, without any cookies or auth headers: That said, for obscure/uncommonly used public repositories with lots of files, there may be some time required to index. I can't imagine it would be any slower, though, than trying to load the content over a client connection and index locally - and I doubt we want to run github1s servers to host indices in the cloud ourselves! Sourcegraph IMO seems like a very realistic and pragmatic compromise. |
Thanks @bpartridge and @sourcegraph, I have tried it, the Sourcegraph API is really powerful! |
It looks like the current file search range is limited to opened files and I hope it will be able to search in the entire project.

The text was updated successfully, but these errors were encountered: