# How does user\_search\_data work?

**URL:** https://meta.discourse.org/t/how-does-user-search-data-work/309664
**Category:** Development
**Created:** [May 28, 2024, 6:54am UTC](https://meta.discourse.org/t/how-does-user-search-data-work/309664 "2024-05-28T06:54:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Isambard](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@Isambard](https://meta.discourse.org/u/Isambard)
#### Post date: [May 28, 2024, 6:54am UTC](https://meta.discourse.org/t/how-does-user-search-data-work/309664/1 "2024-05-28T06:54:50Z")

</div>

Looking at the user\_search\_data table, I was wondering how this works? The search data seems to break up the username into bits presumably to help searching. Is this documented anywhere?

I noticed also that one or two users had no search data and maybe this is a bug (on another forum I have all users have search\_data).

Is there some command I can issue to fix/refresh the search data for the users. Or if I understand how it is created, I can manually fix as there are only a few.

```plaintext
 user_id | search_data | raw_data | locale | version 
---------+--------------------+-------------+--------+---------
      48 | 'e':2A 'trainer':1A | trainer_d | en_GB | 3

```

---

<div class="post-metadata">

### Author: ![Isambard](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@Isambard](https://meta.discourse.org/u/Isambard)
#### Post date: [May 31, 2024, 11:28pm UTC](https://meta.discourse.org/t/how-does-user-search-data-work/309664/2 "2024-05-31T23:28:51Z")

</div>

I found the answer, it is documented here: [PostgreSQL: Documentation: 18: 12.3.&nbsp;Controlling Text Search](https://www.postgresql.org/docs/current/textsearch-controls.html)
