# Hoe vind je welke gebruiker een specifiek trefwoord heeft gezocht?

**URL:** https://meta.discourse.org/t/how-to-find-which-user-searched-specific-keyword/193205
**Category:** Support
**Created:** [8 juni 2021 om 20:41 UTC](https://meta.discourse.org/t/how-to-find-which-user-searched-specific-keyword/193205 "2021-06-08T20:41:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [8 juni 2021 om 20:41 UTC](https://meta.discourse.org/t/how-to-find-which-user-searched-specific-keyword/193205/1 "2021-06-08T20:41:59Z")

</div>

I noticed some toxic keywords were searched in my forum. Is there a way to find who searched them?

---

<div class="post-metadata">

### Author: ![cocococosti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cocococosti/32/231474_2.png) [@cocococosti](https://meta.discourse.org/u/cocococosti)
#### Post date: [11 juni 2021 om 19:04 UTC](https://meta.discourse.org/t/how-to-find-which-user-searched-specific-keyword/193205/2 "2021-06-11T19:04:00Z")

</div>

You could check the `search_logs` table. You could use this query in the [Data explorer](https://meta.discourse.org/t/32566?silent=true) plugin:

```plaintext
-- [params]
-- string :word = my_word
SELECT * from search_logs where term = :word

```

For example, in my site I wanted to know who searched for the word `rainbow`:

 ![Screen Shot 2021-06-11 at 15.02.17](https://global.discourse-cdn.com/meta/original/3X/1/d/1d50f114c6a292de251e1d5da767c4343b90bc23.png)

---

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [12 juni 2021 om 04:19 UTC](https://meta.discourse.org/t/how-to-find-which-user-searched-specific-keyword/193205/3 "2021-06-12T04:19:14Z")

</div>

Ty, also for ppl who didn’t install [data explorer](https://meta.discourse.org/t/32566?silent=true), access database directly like:

> [@How to access the discourse database?](https://meta.discourse.org/t/how-to-access-the-discourse-database/41845/14):
>
> Here ya go, just for you @Divert : Assuming you are in OOTB single container mode in the standard supported setup: cd /var/discourse ./launcher enter app su discourse psql discourse Now, if all was running properly, you are in the DB as the discourse user connected to the discourse DB ready to issue PostgreSQL and SQL commands. Then, if you want to list all the tables in the DB, you can: \dt If you want to list all tables with the word “setting”, then you can: \dt \*setting\* If you find…

and run

> [@cocococosti](#):
>
> ```plaintext
> -- [params]
> -- string :word = my_word
> SELECT * from search_logs where term = :word
> 
> ```

also works.

---

<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: [12 juli 2021 om 04:19 UTC](https://meta.discourse.org/t/how-to-find-which-user-searched-specific-keyword/193205/4 "2021-07-12T04:19:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
