Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on User search only finds names which begin with the search term

Post

User search only finds names which begin with the search term

+4
−0

The search field at the top of the users page appears to only search from the beginning of a username.

For example, trying to find my username, "trichoplax", succeeds only for prefixes of the name. Searching for the whole word works, but searching for anything less than the whole word only works if it includes the "t" at the start.

Search types

Prefixes

Prefixes such as "tri", "trich", and "trichop" all successfully return "trichoplax" as one of the results.

Postfixes

Postfixes such as "plax", "lax", and "ax" do not include "trichoplax" in the results.

Substrings

Substrings that are neither prefixes nor postfixes such as "rich", "hop", and "chop" also do not include "trichoplax" in the results.

Solutions

This can make results misleading, giving the impression that a username does not exist. I can see 2 potential solutions:

  1. Add a note to the page to make clear that only usernames with the search term as a prefix will be found.
  2. Expand the search to include any username with the search term as a substring (so all of the examples shown above would include "trichoplax" in the results).

I would much prefer solution 2, but if there is any reason to avoid or delay its implementation, solution 1 would be helpful in the meantime.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

2 comment threads

Scalability (8 comments)
Make it clear that exact match also works (4 comments)
Scalability
Michael‭ wrote 7 months ago

In the glorious future when CD has 10k+ active users, it might be a hindrance for search results to return all people whose names have a matching substring. That could be lots of extra results to wade through.

trichoplax‭ wrote 7 months ago

Although I agree and I'd like to see future improvements to search (in general and user search) to narrow down results, I would want to see narrowing that is:

  1. Explained to the searcher.
  2. A useful narrowing.

Having a hypothetical checkbox for "whole word match only" narrows down in a way that is easy to understand, and useful provided you know it's what's being used.

Having only results that match a prefix isn't useful unless you know it's happening, and ideally have checkboxes to switch between prefixes only, postfixes only, substrings, whole words only, ...

trichoplax‭ wrote 7 months ago

At larger scale, I think the filter approach that's been taken on other Codidact pages could work well for user search (with different filters as appropriate).

celtschk‭ wrote 7 months ago

Another point to handle it would be to order the results by how well the search term matches. The exact match, if it exists, should certainly be the top result. The score for the remaining maches could then be how much of the user name matches (when typing "tri", and there exist a username "trixie", that should come before "trichoplax"). Matches that come earlier in the user name could score higher (so the when searching "tri", "trixie" coms before "matrix". Also you could make search case insensitive, but score the results after matching case (so a search for "Tri" sorts "Trick" above "trial".

Think about search engines: You don't mind getting thousands of hits if the hit you want is on the first page. And if it isn't, you are glad that you still can access further pages.

trichoplax‭ wrote 7 months ago

I like this approach of making a guess at what the user will want to see, but still including the rest.

Michael‭ wrote 5 months ago

@celtschk If you transfer that comment to an answer, I'd upvote it. If you don't, I'll make an answer citing you.

I ran into this same user search thing today.

trichoplax‭ wrote 5 months ago

Whichever one of you makes that answer, I will also upvote it.

celtschk‭ wrote 5 months ago

Michael‭ Well, as I see, you've already added that post yourself. But that's OK; it saves me some (minimal) work. :-)