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

Topic search should use exact match #7922

Closed
1 of 3 tasks
davidsvantesson opened this issue Aug 20, 2019 · 4 comments
Closed
1 of 3 tasks

Topic search should use exact match #7922

davidsvantesson opened this issue Aug 20, 2019 · 4 comments
Labels
type/enhancement An improvement of existing functionality

Comments

@davidsvantesson
Copy link
Contributor

Description

Current behavior: Topic search includes all repositories with a topic containing the search string

Expected behavior: When clicking on a topic, you want to search that particular topic, not any topics containing that topic. For example, looking for topic "it" shall not give repositories with topic "git" or "gitea".

I think generic searches could contain any repository with search term in name or part of topic, as today.

@lafriks lafriks added the type/enhancement An improvement of existing functionality label Aug 20, 2019
@guillep2k
Copy link
Member

Currently the search function does not make a distinction between name, description and topic. We could force a search by whole words for all fields, or we could make a distinction for the topic, like in topic:<word>. We could even do both. Is there a preference for this?

@davidsvantesson
Copy link
Contributor Author

@guillep2k The search function actually doesn't look into description today, something I'm also missing.

In the long term I think it would be a good idea to support filters in repo search, similar that GitHub does for issue search. Search within name and description should probably still be "free text" search.
Something to consider is whether whole words shall always be used for topic search, or only when you specifically search for topic (topic=1). I did a test implementation and noticed a behavior that can potentially be confusing for the user; In the interactive (ajax) search on the dashboard, there can be more results as you type (instead of narrowing down). Although I don't see a problem with that.

@guillep2k
Copy link
Member

I see, I hadn't thought about the incremental search. It looks like it should be handled differently than the "proper" search.

@davidsvantesson
Copy link
Contributor Author

Closing issue as related PR is merged.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants