-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Search for text that includes underscore returns nothing #5277
Comments
If you just enabled the feature on app.ini, it will spend some time to create the index, maybe the index is not finished. |
Hmm... I bet this has to do with the way bleve segments out words. Could it be that it's seeing and indexing "list_users" as "list users"? |
A search for "list users" also returns nothing, unfortunately... Some other points:
Furthermore: |
Hmm. OK a quick test of blevesearch/segment seems to imply that "list_users" would form a single segment. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
I just tried it with gitea 1.6.4 and it's still an issue. Single word queries give results, but snake_cased queries return nothing even though the variable names are present in the repo. |
The words splitter just uses spaces to split the words. I think that's why when you have |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue renders the search functionality pretty much useless for code that regularly includes underscores (e.g. python). A couple more examples... The following search returns a single result (there should be 33 matches from my count): The following search returns no results (there should be 3 matches from my count): |
[x]
):Description
I've enabled repository search in app.ini, however this feature is next to useless. If I search for a function name, say "list_users", the search returns nothing. Same for "list_" or "_users" - it seems as if the search doesn't like the underscore symbol.
The text was updated successfully, but these errors were encountered: