gh-issues icon indicating copy to clipboard operation
gh-issues copied to clipboard

Partial search / Search issues by a partial word

Open bartlomiej-dawidow opened this issue 5 years ago • 7 comments

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)

bartlomiej-dawidow avatar Jan 30 '20 14:01 bartlomiej-dawidow

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.

Dante3085 avatar Aug 04 '22 09:08 Dante3085

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

rrajaste avatar Apr 05 '23 09:04 rrajaste

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?

Dave-Allured avatar Feb 09 '24 17:02 Dave-Allured

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 avatar Feb 09 '24 22:02 ahpook

@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.

Dave-Allured avatar Feb 09 '24 22:02 Dave-Allured

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/

ahpook avatar Feb 09 '24 23:02 ahpook

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

bartlomiej-dawidow avatar Feb 12 '24 12:02 bartlomiej-dawidow