How does user_search_data work?

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.

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

I found the answer, it is documented here: PostgreSQL: Documentation: 16: 12.3. Controlling Text Search

1 Like