discourse/db
Rafael dos Santos Silva 14cf8eacf1
FEATURE: Use similarity in user search (#20112)
Currently, when doing `@mention` for users we have 0 tolerance for typos and misspellings.

With this patch, if a user search doesn't return enough results we go and use `pg_trgm` features to try and find more matches based on trigrams of usernames and names.

It also introduces GiST indexes on those fields in order to improve performance of this search, going from 130ms down to 15ms in my tests.

This is all gated in a feature flag and can be enabled by running  `SiteSetting.user_search_similar_results = true` in the rails console.
2023-02-02 13:35:04 -03:00
..
fixtures DEV: Apply syntax_tree formatting to `db/*` 2023-01-09 11:59:41 +00:00
migrate FEATURE: Use similarity in user search (#20112) 2023-02-02 13:35:04 -03:00
post_migrate FEATURE: rate limit anon searches per second (#19708) 2023-01-27 10:05:27 -08:00
api_test_seeds.rb DEV: Apply syntax_tree formatting to `db/*` 2023-01-09 11:59:41 +00:00