Topic search doesn't search for user names

Basically the issue the title describes. When I press CTRL+F and search for a user that posted in a specific thread, I only find the people quoting them.

This is unexpected, because with the browser search I’d expect to search in the post author field as well.

2 Likes

Er… what? Ctrl+F finds you just fine. Press CTRL+F right now and type “heinrich”.

1 Like

It works. In Chrome CTRL F opens Chrome’s find box so you have to click on the magnifying glass.

Try it in this thread, where the discourse-specific search pops up when pressing CTRL+F.

Using topic search (and not browser-based Ctrl+F) in this topic:

I can confirm this is happening on our site, too.

1 Like

I guess this is legit, but I never even thought search would be used like this

I see what you meant, I just don’t see the purpose of what you are requesting. Use the topic map under the first post to see a “cast of characters” in the topic, click or tap on the avatars to filter by that user.

But in a popular topic, not all the users appear there:

It’s also rather less convenient for keyboard users than simply typing the name in the search box.

True, but that is a pretty rare case, and the odds are that you want an active participant who will be listed.

I feel like the OP should define the rationale for this feature. Tell us a story of why this is needed, give us an example.

At the bare minimum the “search within topic” should do a + username to every post it searches. that way at least you can easily find the content by a user using search.

I see a lot less value in finding the participants there. Don’t support that change its confusing.

1 Like

I’m not sure why you retagged my topic as feature. I pressed CTRL+F and Discourse did something my browser wouldn’t do when I press CTRL+F.

The story behind this is simple, I wanted to search for all posts of a certain user. I wasn’t aware of the fact that you could filter by author by simply clicking their avatar in the topic summary.

However I still think that this should be included in the search function for the reason that the Discourse search does something different from what users (at least me) are expecting.

[Also, hiding all other posts isn’t exactly the same as being able to go through all posts from one author, you get more context (unhiding other people’s post in between basically undos the filter)].

@heinrich5991 re-read my previous post, I support making a change here, just no the change you are suggesting :slight_smile:

When I’ve been interested in a particular member’s posts I’ve been going to their Profile and Searching from there.

For Topics I always just start reading from wherever I left off.

But I guess if someone wanted to cherry-pick a certain members posts out of a topic it would be a nice feature.

This would be the reason, if you are going to hijack a known action, you really need it to behave similar to the action (not pick and choose what your new action does). CTRL + F does this option (I’ve used it in the past too for various moderating reasons).

@sam, it would stand to reason that your solution would still require me to search for a particular text, and the + username simply limits the results to posts by a given user. I don’t necessarily have search terms I want to find. I strictly want to navigate to the user’s post one at a time grabbing the context above/below (on occasions). So your proposed solution doesn’t actually fit the story, it is a different story.

2 Likes

I just added username and name to the search terms and it seems fine to me

https://github.com/discourse/discourse/commit/05eff38f34b532ec102cd67ee13c9b1cafee12c0

Shall I close this @heinrich5991 ?

3 Likes

That’s exactly what I wanted, thanks for implementing it. Can be closed.