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

**URL:** https://meta.discourse.org/t/search-api-u-search-and-wild-cards-or-features/126171
**Category:** Support
**Created:** [8월 19, 2019, 1:50오후 UTC](https://meta.discourse.org/t/search-api-u-search-and-wild-cards-or-features/126171 "2019-08-19T13:50:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alank](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@alank](https://meta.discourse.org/u/alank)
#### Post date: [8월 19, 2019, 1:50오후 UTC](https://meta.discourse.org/t/search-api-u-search-and-wild-cards-or-features/126171/1 "2019-08-19T13:50:50Z")

</div>

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…

\*andrew  
\*marian  
\*mark

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…

```plaintext
this.DiscourseAPI.get(`u/search/users.json?term=${term}&include_groups=false&include_mentionable_groups=false&include_messageable_groups=false&topic_allowed_users=false`

```

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [8월 21, 2019, 4:15오전 UTC](https://meta.discourse.org/t/search-api-u-search-and-wild-cards-or-features/126171/2 "2019-08-21T04:15:03Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [4월 12, 2024, 4:57오전 UTC](https://meta.discourse.org/t/search-api-u-search-and-wild-cards-or-features/126171/6 "2024-04-12T04:57:22Z")

</div>


