-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
How to search for file and folder name inside repo? #9005
Comments
It's not supported yet. |
Sorry for the cross-post: |
Any progress on this? |
@ili101 we gladly welcome PRs. 😁 |
That's an awesome thing! unforgivably Go is not one of my expertise (yet) 😁 |
+1, for many time, filename/pathname is even more meaningful than file content. |
First of all, thanks great gitea! I'm using gitea heavyly and it works lightweightly and smoothly for years! Back to this topic, I need this feature as well recently. After kinds of struggling,
It was resolved today, by change 1 line of code (gitea branch 1.15.7, for bleve search only): // change modules\indexer\code\elastic_search.go if you are using ES.
==>
then build your own gitea.exe and enjoy it :) After replace this gitea.exe, you may need to delete all the code search index files (app.ini: REPO_INDEXER_PATH = ), restart gitea to make a full indexing (with pathname search enabled) |
A general method is to add a new field |
Yes you are right, from gitea deve pov, it shall go in a general way, ensure code quality and extensibility. |
@lunny why cant your workaround be a PR? |
FYI, there is a new feature: Go to file It should be more convenient if you know you are searching for file names: |
@wxiaoguang thanks this does the expected. |
Yup, it's not optimized yet. How large is your repo? For linux kernel repo (4G, 80k files) is about ten seconds on my side.
What's the |
@wxiaoguang config to enable a cache. I can cope with 10sec the first time the repo is indexed, but not every time I search for a file. Also it should treat the search query as a sequence of strings, not a sequence of chars. Currently a search for "IdleState" returns a file like And actually - if I know anything about grep - its probably slower because its searching those individual characters. |
In our setup, we would love to be able to search for a filename across all repos ... |
This comment was marked as off-topic.
This comment was marked as off-topic.
@delanym gitea/modules/indexer/code/bleve.go Line 183 in e81ccc4
|
Hmm, IIRC this issue is asking about "repo indexer" , the "goto file" could help in some cases but not 100% resolves the issue. |
Ah, you mean a global search through all repos? |
I have enabled repo indexer so that I can search code inside files of certain repo. But I also want to search for file/folder name, how do I do that?
I have tried **keyword, **keyword**, **.py, etc. But it didn't work.
The text was updated successfully, but these errors were encountered: