I’ll add my desire to filter/search custom user fields in the user directory.
Our community runs a hybrid WordPress/Discourse setup and we’ve created a map-based member directory on the WordPress side. But what our members really want is an interest-based member directory.
This is really hard to pull off on the WordPress side. But I don’t think it would take too much work to implement at https://[YourDiscourseSite]/u.
For example, we have custom user fields for current learning goals, places you’ve lived, and – most popularly – interests/passions/skills. If I could do a keyword search for a shared interest of “community building” or even a learning goal of “python coding,” that would be incredible for my community.
@HAWK, I know you were nudged in @weallwegot’s reply in September 2022. I’m willing to spell out the specs for a feature request if that’s the way you want this desire to unfold.
For what it’s worth, I’m not the only one looking for enhanced search abilities in the user directory.
I tested the user directory search by custom field, and there is indeed room for improvement.
Among other things, special characters can make the search not return results when it should, the layout doesn’t have much room to show more columns, etc…
I think if changes have to be made, it would be starting from here, to have a cleaner and more reliable feature to work with.
Jim, I saw your forum thread as well when I was searching for a way to do what you and I both want to do. Having the functionality in Discourse core seems to make the most sense from my non-coding perspective because it seems like a useful tool for all Discourse users.
Having a plugin or theme component to do what we want will mean the vast majority of Discourse users never even know they have the option.
Ah yes, I agree, I’d prefer it be in Discourse core. I think the user directory can be one of the biggest features of Discourse, depending on how someone uses it. I imagine using it for a nonprofit association, where the communication could happen here, the member directory, and also the subscription if people want.
Perhaps it could start as a plugin/theme and then get integrated into core.
Does this currently work with the core version of user field search? I took a look at the commit for that release and it looks like it should. I don’t have a handy instance now to test it - but curious specifically what you feel is missing!
I ask because I had made a plugin for this use case in 2020, but never got around to open-sourcing it. I’m really interested in exploring use cases for making content searchable in communities (especially across multiple platforms - so if this happens to be your use case let me know, would love to chat further!).
Anyways- here’s the plugin, i’m like 80% sure it’s redundant with how the core version ended up getting implemented, but in case there are improvements or collaborations in development- I thought I’d share.
No, what I describe doesn’t currently work as of Discourse 3.1.0.beta4.
We actually use a WordPress-Discourse hybrid for our community. It would be amazing to be able to search across the two platforms with one tool, but I’d be happy with just searching for custom fields in Discourse.
You mentioned that you created it in 2020, so I wouldn’t have expected you to have updated it since then.
I’m guessing there would need to be some further updates to the plugin before it was compatible with the current Discourse core version. And since I don’t believe the Discourse devs have any plans to incorporate custom fields searching in core, I’m just waiting for someone like you to say “My plugin works!” … and then I’ll test it.
This piece of knowledge was a huge missing piece for me! Previously, I just made certain custom fields searchable, added a column for their display at /u, and then searched right away. I didn’t get any results returned because the Jobs::ReindexSearch background job hadn’t run yet.
Now that I know this key piece of info, I was able to experiment with how I would use the custom fields search. Unfortunately, there are too many UX issues with the current functionality that would prevent me from allowing my forum members to use the custom field search.
I recorded this video to show Discourse devs, plugin developers, or anyone else who’s curious what I mean.
If you can’t or don’t watch the video, here are my written highlights of the UX issues.
The default option for the display is probably something other than All Time (e.g., Week or Month). So searchers might think that the search results they get are limited to people who have been active in the past X week / month / quarter / year.
The search box has text that says “filter by username.” Nothing about that says “Use me for a keyword search.”
The drop-down says “all groups” and people could be forgiven for thinking that the primary use of the search is group related and not forum-wide.
You can’t search by individual custom field. You’re searching all the fields at once and that might return too many results depending on your number of users and/or the keyword(s).
Typing in the search box returns real-time results as you continue to type. But the cursor has such a short stay time before new results are loaded and the cursor moves off the input field. Some people type slow or pause, so this isn’t great.
You have to scroll to the right for custom fields. And that’s not realistic on mobile view where most people are accessing the forum.