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

Partial search / Search issues by a partial word #70

Open
bartlomiej-dawidow opened this issue Jan 30, 2020 · 7 comments
Open

Partial search / Search issues by a partial word #70

bartlomiej-dawidow opened this issue Jan 30, 2020 · 7 comments

Comments

@bartlomiej-dawidow
Copy link

The suggested feature is to support an asterisk wildcard or a different form of partial search in the issues tab, for example:

is:issue is:open sustain*

which should match sustainable, sustainability etc.

GitHub provides a fairly elaborate search syntax, as explained here:
https://help.github.com/articles/understanding-the-search-syntax/
https://help.github.com/articles/searching-issues-and-pull-requests/

But it does not support partial searches, as discussed here:
https://stackoverflow.com/a/38532151

Quote from GitHub staff:

Thanks for getting in touch - search doesn't currently support partial searches, so in your example, you're correct you would have to search for "feature". Though not the same, we do however do some stemming for plurals - so searching for "features" would find "feature".

This is much more problematic in languages with grammatical cases than in English, such as German, Polish, French, Ukrainian, and many more. To give you an example the Polish word for function is funkcja but depending on the context it can be any of:

funkcja
funkcji
funkcją
funkcję

(and more)

Or plurals:

funkcje
funkcji
funkcjami
funkcje

Without partial searches, you have to go through all of the variations to find the matching issues. This makes the search functionality barely usable in languages other than English.

If we were able to search by funkc, we could find all relevant issues in one go. It is a common functionality in search engines. Optionally this could be done with a wildcard, i.e. funkc*.

(This feature request was originally posted here: https://github.community/t5/How-to-use-Git-and-GitHub/Feature-request-Partial-search-Search-issues-by-a-partial-word/m-p/15141)

@Dante3085
Copy link

I frequently feel like I am not finding the issues I am looking for because there is no partial search. I look for an issue about a laggy game camera, but typing "lag" doesn't find that issue. Only "laggy". Really annoying.

@rrajaste
Copy link

rrajaste commented Apr 5, 2023

This is especially annoying for languages that extensively use compound words or for languages with many noun cases (Finnish, Estonian, Hungarian etc)

@Dave-Allured
Copy link

I need to locate pull requests for all versions of a particular software package in a github-hosted repo. I care only about title matching, not contents. Without partial string match, I simply get incomplete and misleading results.

Filters:  is:pr package    <-- FAIL
Filters:  is:pr package*   <-- FAIL
Filters:  is:pr package8   <-- FAIL, INCOMPLETE, REQUIRES GUESSING

Wildcarding was invented several decades ago, for good reason. Github, are you listening?

@ahpook
Copy link

ahpook commented Feb 9, 2024

In 2023, a completely reworked search engine rolled out, which supports partial searches and more sophisticated stemming. To the original question from @bartlomiej-dawidow , I can now search for funk and get code results that include funktioniert , funksjoner, funkce and funkci : https://github.com/search?type=code&auto_enroll=true&q=funk

I believe the PR filter/search experience does not yet use this engine, its entry point is only from github.com/search - but you can refine the search from there to take advantage of this

https://github.com/search?type=pullrequests&auto_enroll=true&q=package+repo%3Adesktop%2Fdesktop+

This returns results that have package , packaging , packages - I don't know whether this matches the number at the end though because I don't have an example of that at hand. Can you see if this works for the repo you're searching, @Dave-Allured ?

@ahpook ahpook closed this as completed Feb 9, 2024
@ahpook ahpook reopened this Feb 9, 2024
@Dave-Allured
Copy link

@ahpook, that looks good. I will test. What is that part about auto_enroll=true? It looks like I am signing up for something I don't want.

@ahpook
Copy link

ahpook commented Feb 9, 2024

i think that query param is from the search feature being feature-flagged, https://github.blog/2023-02-06-the-technology-behind-githubs-new-code-search/

@bartlomiej-dawidow
Copy link
Author

Partial search does seem to work for code, but not for issues, which this topic about.

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

5 participants