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

Open
opened 2025-11-02 03:55:03 -06:00 by GiteaMirror · 13 comments
Owner

Originally created by @sgtwilko on GitHub (Nov 24, 2017).

  • Gitea version (or commit ref): 1.2.3
  • Git version: 2.15.0
  • Operating system: Windows
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

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

Originally created by @sgtwilko on GitHub (Nov 24, 2017). - Gitea version (or commit ref): 1.2.3 - Git version: 2.15.0 - Operating system: Windows - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [x] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## 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: <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![image](https://user-images.githubusercontent.com/658876/33207897-6766a3d6-d107-11e7-9d3b-4f05ee57c30d.png) Searched for "dave" but it failed to find "test_dave": ![image](https://user-images.githubusercontent.com/658876/33207927-8036a08c-d107-11e7-88ec-081009a5c2fc.png)
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 03:55:03 -06:00
Author
Owner

@lunny commented on GitHub (Nov 25, 2017):

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

@lunny commented on GitHub (Nov 25, 2017): I think this is a designed feature. And currently it also don't support CJK languages.
Author
Owner

@ncantelmo commented on GitHub (Jan 10, 2018):

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.

@ncantelmo commented on GitHub (Jan 10, 2018): 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.
Author
Owner

@stale[bot] commented on GitHub (Feb 9, 2019):

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.

@stale[bot] commented on GitHub (Feb 9, 2019): 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.
Author
Owner

@JVimes commented on GitHub (Feb 14, 2023):

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

@JVimes commented on GitHub (Feb 14, 2023): Search for `click` didn't find `clicks` for me. Very surprising. This is a moderately large problem for me.
Author
Owner

@lunny commented on GitHub (Feb 15, 2023):

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

@lunny commented on GitHub (Feb 15, 2023): Since Gitea has 3 engines for issue indexing, I assume we are talking about bleve. #22829 has resolved camelCase problem.
Author
Owner

@JVimes commented on GitHub (Feb 15, 2023):

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

@JVimes commented on GitHub (Feb 15, 2023): @lunny Does #22829 make query "click" find result "clicks" (with the "s")?
Author
Owner

@lunny commented on GitHub (Feb 16, 2023):

@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

@lunny commented on GitHub (Feb 16, 2023): > @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
Author
Owner

@wxiaoguang commented on GitHub (Feb 16, 2023):

Bleve has some stemers:

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

(Just come across, FYI)

@wxiaoguang commented on GitHub (Feb 16, 2023): Bleve has some stemers: * https://github.com/blevesearch/bleve/issues/1750 That issue mentions that "snowball and porter stemmers" can stem words to their origins. (Just come across, FYI)
Author
Owner

@JVimes commented on GitHub (Feb 16, 2023):

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

@JVimes commented on GitHub (Feb 16, 2023): If stemmers can implement partial-word matches that would solve the general case. Otherwise I think they would help a bit.
Author
Owner

@jgschis commented on GitHub (Mar 3, 2023):

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

@jgschis commented on GitHub (Mar 3, 2023): 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
Author
Owner

@Leon-001 commented on GitHub (Mar 22, 2023):

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

@Leon-001 commented on GitHub (Mar 22, 2023): Or at least a wildcard symbol such as "*" or "%" would be great!
Author
Owner

@coolbombom commented on GitHub (Aug 15, 2023):

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

@coolbombom commented on GitHub (Aug 15, 2023): any news regarding this issue. when will it be integrated/fixed?
Author
Owner

@hakito commented on GitHub (Jun 17, 2024):

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 :-(

@hakito commented on GitHub (Jun 17, 2024): 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 :-(
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1275