Add project type for global search from ES
What does this MR do?
When doing global search, both projects and snippets are counted under projects. It brings a couple of issues. First, projects and snippet are mixed under project. It may bring confusion and result some usability issue. Second, pagination logic tries to fetch projects based on the total number of projects and snippets, which is a bug.
So, to fix this issue, I add a filter item, type: ["project"]
, which will only return projects from Elasticsearch.
This MR tries to address #36340 (closed)
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
- [-] Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
- [-] Tested in all supported browsers
- [*] Manually tested on my local environment. With the fix, the count of projects matches the number I got from console; the links to each project seems correct.
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖