go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.25k stars 5.51k forks source link

Unable to search issues for part of a word. #2967

Open sgtwilko opened 7 years ago

sgtwilko commented 7 years ago

Description

The Issue search does not find an issue when searching for part of a word within the issue name/description.

We discovered this as we had created an issue for each file we needed to deal with. Our filenames have a specification that indicates where and what the purpose is of the file. For example: Customer_SupportTicketRaise

If we search the issues for "SupportTicket" or "Customer" no issues are returned as this would only match a partial string. I can understand that searching for part of a string could return too many results for most people, but either including those results below the full string match, or having the option to search for a partial string would be better as, at first, we thought the entire search was broken.

Screenshots

Created serveral issues:

image

Searched for "dave" but it failed to find "test_dave": image

lunny commented 6 years ago

I think this is a designed feature. And currently it also don't support CJK languages.

ncantelmo commented 6 years ago

Hey all,

I just upgraded from Gogs yesterday specifically because I saw that issue search had been added to Gitea. I'd like to second this enhancement request, but also request that fuzzy matching be considered as part of it.

When you're adding to a large backlog and you don't remember the exact terms you used (e.g. migrate vs. migration vs. migrations), it can be easy to miss an existing issue and create a duplicate.

stale[bot] commented 5 years ago

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.

JVimes commented 1 year ago

Search for click didn't find clicks for me. Very surprising. This is a moderately large problem for me.

lunny commented 1 year ago

Since Gitea has 3 engines for issue indexing, I assume we are talking about bleve. #22829 has resolved camelCase problem.

JVimes commented 1 year ago

@lunny Does #22829 make query "click" find result "clicks" (with the "s")?

lunny commented 1 year ago

@lunny Does #22829 make query "click" find result "clicks" (with the "s")?

Not yet. Looks like bleve doesn't support that, we may need to write a customized token filter

wxiaoguang commented 1 year ago

Bleve has some stemers:

That issue mentions that "snowball and porter stemmers" can stem words to their origins.

(Just come across, FYI)

JVimes commented 1 year ago

If stemmers can implement partial-word matches that would solve the general case. Otherwise I think they would help a bit.

jgschis commented 1 year ago

You can use the ngram analyser to do partial string matching.

So customer_support_ticket

could be ngrammed as

cus cust custo custom custome customer customer_ etc

Leon-001 commented 1 year ago

Or at least a wildcard symbol such as "*" or "%" would be great!

coolbombom commented 1 year ago

any news regarding this issue. when will it be integrated/fixed?

hakito commented 5 months ago

At least a prefix based search now works (when using an external indexer like meilisearch)

But only for the global issues search and not on the repo level :-(