Get no results when using search issues API with keyword which length less than 3
I use issues search API to list issues in a project. Search keyword’s length is greater than 2, it works normaly. But when the seach keyword’s length is less than 3, I can’t get any result.
GET /issues?search=fo
Is it a bug in GitLab API?
GitLab version: GitLab 14.4
I just checked by calling directly GitLab API and it seems that the search API need at least 3 characters to run the search.
See the following links in your browser:
- https://gitlab.com/api/v4/projects/4180516/issues?search=ex => no result
- https://gitlab.com/api/v4/projects/4180516/issues?search=ext => multiple results
I can't find any information in the official documentation: https://docs.gitlab.com/ee/api/issues.html I think the limitation exist to avoid matching too many results. I suggest you to check if there is an issue on GitLab repository about this behaviour. https://gitlab.com/gitlab-org/gitlab/-/issues/