Skip to content

Allow searching of users using less than 3 chars

What does this MR do and why?

When searching for users within a project / group, send use_minimum_char_limit: false so that we still do partial matches for search terms that are less than 3 characters.

This minimum was added so that the global trigram index can be used. But when we're joining with memberships, the data should already be filtered enough so it won't need the trigram index. Even with longer strings, most of the time it won't use the trigram index anyway due to the joins.

Group users query

Old: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/8299/commands/29302

New: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/8299/commands/29303

Project users query

Old: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/8299/commands/29306

New: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/8299/commands/29308

How to set up and validate locally

On the issue / MR sidebar, open the assignee dropdown and enter one letter into the search bar.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #19706 (closed)

Edited by Heinrich Lee Yu

Merge request reports