Search API '/u/search and wild cards or features?

I’m attempting to use the Discourse search via /u/search/… and unless I’m mistaken it doesn’t offer wildcards or defaults to partial matches within names, for example I have the following users…


If I search on 'an" I only get ‘andrew’
If I search on 'ma" I get both ‘mark’ and ‘marian’

Are there any wild-card features to find on a search of ‘an’ to both get ‘andrew’ and ‘marian’ ?

My full query in JS is…


Where {term} is replaces by the user search string (eg. ‘an’ or ‘ma’)

1 Like

We would need trigrams do do that efficiently, at the moment we use full text search.

The restriction is in place cause we don’t want to scan a table with potentially millions of rows.

1 Like