Search sometimes tokenizes unique user names and some times does not


(Peter N Lewis) #1

As with Topic search doesn’t search for user names, regular search should include usernames.

For example, if I want to search for a topic on clipboards that a specific person posted in (say me for example), I want to be able to search the site for:

clipboard peternlewis

yet this finds nothing generally. For example on my site I can find the post Paste Color Data with a search for:

paste color data

but not with

paste color data peternlewis

I’m getting complains from my users that they can’t find posts or replies by specific people.


(Jens Maier) #2

This query works fine:

paste color data user:peternlewis

I don’t think it’s a good idea to dumb-down the search feature for new users; however, it might be a good idea to check for known usernames in the search terms and pop in a “Did you mean user:foobar? There are even more options!” message for users below TL2.


(Sam Saffron) #3

This is a bit of a bug:

and


(Jens Maier) #4

So what would be the expected result for those two queries?

By the way:


(Sam Saffron) #5

Its tricky, something has to give, its either magic all the way down or we go with the strict approach and break the elbert search.


(Jens Maier) #6

Magic all the way through, but another kind of magic:

P.S.: I really don’t like being broken. :frowning:


(Jeff Atwood) #7

The entire premise is wrong. If you mean in topic search you should be using the topic summary to filter by users.

Searching for elberet works fine for me…


(Jeff Atwood) #8

This would also be super problematic for users with names that matched common words, like “super”. Is it a username? Is it a word? Who knows. You really need to specify when you want a per user search.


(Sam Saffron) #9

My point then is that I should go out of my way to break

And fix:

Cause this works as expected

Therefore we have two totally inconsistent ways of doing things here and it needs a cleanup.


(Jens Maier) #10

Hm, I think I got confused somewhere, likely due to the time…

Anyway, I can’t think of a better way to both be friendly towards new users and have clean syntax. :confused:


(Peter N Lewis) #11

Hmm, well, I didn’t realise user: worked, because if I search for just “user:peternlewis” it finds nothing.

So after that I gave up on user:peternlewis and just expected “peternlewis” to work and that doesn’t either which just left me confused.


#12

How are keyword-colon modifiers intuitive/discoverable for anyone?
I don’t recall ever having encountered software that required me to use such a thing in order to search by username.

A normal user would think that the more detail they add to their search, the better.
Usual details would be parts of the topic name, username and parts of the post content.
But this means that a very effective search criterion would require arcane incantations and not knowing that, just typing it in normally without the keyword-colon prefix would lead to the opposite of what they want when searched for - users usually don’t mention their own name inside their posts.

Having it mentioned on the help page doesn’t help, either.


Search of category and user should return results
(Mittineague) #13

IIRC an “advanced” Search was discussed a while back and it was decided to put it on the ToDo list.

I don’t know how that work is going / went.

Might be that other work has taken priority, that problems caused the idea to be scrapped, or that the current alternative “search modifier” approach is the outcome of that pursuit.


(Jeff Atwood) #14

Searching for a user inside a topic is already an extremely weird / rare thing to do. I don’t think I’ve ever done that, and I’ve used Discourse for what… 3 years now?

I do regularly search for usernames from the homepage when I want to check in on what someone posted recently, or search within their posts though.


(Onyx) #15

How about something users are already used to in Discourse? Why not use @ sytanx? So, @username instead of user:username?

I don’t see a special reason for someone to search for an @mention in specific other than looking for posts that mentioned themselves (because only the first notification is sent out), but I think that’s something a filter (like the one in the usercard) would solve better than a search modifier.


(Jeff Atwood) #16

Hmm yeah, requiring @username is a very good idea.


(Mittineague) #17

I’ve done it maybe 3 times total for Mod related purposes. But not really a Search, What I’ve done is click the member’s avatar in the “summary” box beneath the OP to filter the topic.


(Peter N Lewis) #18

Having @username as an equivalent for user:username would be a good idea.

I still don’t understand why a search for user:peternlewis turns up nothing.

And I would also suggest that in the case where a search turns up no results, that it would be a very nice touch to check and see if the search would work if you searched any field, and if so make the suggestions as described (Search: username "No results - Did you mean user: username (or @username).


#19

I do that sort of thing a lot on long topics. It’s easier than going to the top, filtering on the user, scrolling through and looking for stuff. Which I’ve done on Discourse because the search didn’t give me what I wanted.

I guess a full page search has more space to show help (or links to get help on more advanced stuff). Maybe the bottom of the dropdown could go to a search FAQ or something.


(Jeff Atwood) #20

You mean like … it already does?