todogroup / gh-issues

A curated set of issues related to GitHub and running corporate scale open source
http://todogroup.org
25 stars 4 forks source link

Partial search / Search issues by a partial word #70

Open bartlomiej-dawidow opened 4 years ago

bartlomiej-dawidow commented 4 years ago

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 commented 1 year ago

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 commented 1 year ago

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

Dave-Allured commented 5 months ago

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 commented 5 months ago

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 ?

Dave-Allured commented 5 months ago

@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 commented 5 months ago

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 commented 5 months ago

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