# Searching by user details

**URL:** https://meta.discourse.org/t/searching-by-user-details/282823
**Category:** Support
**Tags:** search
**Created:** [October 19, 2023, 7:03pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823 "2023-10-19T19:03:41Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [October 19, 2023, 7:03pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/1 "2023-10-19T19:03:42Z")

</div>

My platform heavily depends on searching users by there profile details.  
But on Discourse you dont get that much flexibility and only limited search through user details.

How to fix that?

---

<div class="post-metadata">

### Author: ![anon65426961](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@anon65426961](https://meta.discourse.org/u/anon65426961)
#### Post date: [October 20, 2023, 4:14am UTC](https://meta.discourse.org/t/searching-by-user-details/282823/2 "2023-10-20T04:14:39Z")

</div>

This might be a feature request, if you mean profile information on discourse isn’t indexed by the built in search function?

---

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [October 20, 2023, 11:00am UTC](https://meta.discourse.org/t/searching-by-user-details/282823/3 "2023-10-20T11:00:03Z")

</div>

It is indexed but not all of it and very less flexibility.

Not indexed at same level as search function works for topics and posts.  
That’s an issue for my site.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 20, 2023, 11:13am UTC](https://meta.discourse.org/t/searching-by-user-details/282823/4 "2023-10-20T11:13:35Z")

</div>

Can you give a few examples where you find Discourse is limited in this respect?

---

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [October 20, 2023, 12:18pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/5 "2023-10-20T12:18:25Z")

</div>

My site help people connect with similar exam dates.

All users in there profile have there exam date visible but used search function to find users by there exam dates, it only show a drop down of 5-6 users but when searched it shows the search from the topics. The search function is able to recognise the specific details from user’s profile details but it can only produce results for username searches.

I hope this makes sense.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 20, 2023, 12:41pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/6 "2023-10-20T12:41:35Z")

</div>

> [@Plabforum](#):
>
> All users in there profile have there exam date visible

How? Is it in a field or in their bio or…?

---

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [October 20, 2023, 12:45pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/7 "2023-10-20T12:45:39Z")

</div>

In the field that I had created during sign up, which is editable and visible in there user card.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [October 20, 2023, 3:37pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/8 "2023-10-20T15:37:22Z")

</div>

The same thing was asked here:

> [@Search with custom user fields](https://meta.discourse.org/t/search-with-custom-user-fields/282785/3):
>
> I also tried the same but It worked only with the name 1vic when I passed the user field value but it didn’t work “sgroup\_admin” [https://supportgroups.com/directory\_items.json?period=weekly&order=likes\_received&name=1vic&user\_field\_ids=5](https://supportgroups.com/directory_items.json?period=weekly&order=likes_received&name=1vic&user_field_ids=5)@Canapin

And here:

> [@Adding non-visible user custom fields to the API](https://meta.discourse.org/t/adding-non-visible-user-custom-fields-to-the-api/276618/2):
>
> This is great, thanks! Is there a way to find a user by a value in a custom field via API?

edit: The 2nd one is mentioning specifically the API so you can ignore this link, though it’s a bit of the same feature in core as the search uses the API.

---

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [October 20, 2023, 3:44pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/9 "2023-10-20T15:44:10Z")

</div>

> [@Canapin](#):
>
> And here:

I have enabled that

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 20, 2023, 3:49pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/11 "2023-10-20T15:49:30Z")

</div>

The problem is that if I do this

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/1/5/a15a3f72ebca97db65d50ed50c1fc9af02c5a377.png)

and then fill in a value and search for it

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/4/9/d493a14dd158eafddf0ee5ee22d12765d526c873.png)

it does not return any results.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 20, 2023, 4:39pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/12 "2023-10-20T16:39:34Z")

</div>

I think there can be a time-lag between filling in the custom field and it appearing in the search, if that could be an issue? (I think the job runs every hour or so) - [Are the custom fields searchable in the user directory? - #12 by JammyDodger](https://meta.discourse.org/t/are-the-custom-fields-searchable-in-the-user-directory/246331/12)

It also doesn’t like special characters so much, so maybe it could be the format of the exam date entered? - [Multiselect Custom User Field not appearing in Search? - #3 by MichelleBasey](https://meta.discourse.org/t/multiselect-custom-user-field-not-appearing-in-search/231339/3)

---

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [October 20, 2023, 5:08pm UTC](https://meta.discourse.org/t/searching-by-user-details/282823/13 "2023-10-20T17:08:39Z")

</div>

> [@JammyDodger](#):
>
> It also doesn’t like special characters so much, so maybe it could be the format of the exam date entered

Exam dates are searchable, details filled in custom field of user field show up during users sign up as a question. For example, the custom field was exam date, so during sign up user will write there date.

This dates are searchable and indexed in search forum, that’s not the problem.

Problem is, the search function works for topics, tags and username- only this three categories. So the complete search for a detail in user’s profile is not accessible but searchable.
