Skip to content

Add search support to `Users::OrganizationsResolver`

What does this MR do and why?

Following the issue, we are adding search support to Users::OrganizationsResolver. The search could be done by name, or path.

note: this MR adds trigram indexes on name and path properties.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Query plan

Query postgres.ai Screenshot
SELECT "organizations".* FROM "organizations" WHERE ("organizations"."name" ILIKE '%Def%' OR "organizations"."path" ILIKE '%Def%'); https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/26250/commands/82550 image
SELECT "organizations".* FROM "organizations" WHERE ("organizations"."name" ILIKE '%%' OR "organizations"."path" ILIKE '%%'); https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/26250/commands/82561 image

How to set up and validate locally

  1. Checkout the branch
  2. Validate that search functionality is working for both name and path

Related to #433954 (closed)

Edited by Bojan Marjanovic

Merge request reports