User-search WebAPI match anywhere in string instead of just the start
Review Request #5503 — Created Feb. 18, 2014 and discarded
We discussed this a while ago, and I believe we agreed that it's more useful to match username, first_name, and last_name queries anywhere in the string(s) instead of just the beginning.
All tests pass aside from a few VCS-dependent ones, which are skipped.
I changed the user WebAPI test to search for the middle of the name ("rum" in "grumpy" instead of "gru"). I didn't bother having both searches, since matching in the middle pretty much guarantees matching at the start.
-
Can you point me to the original discussion? I don't remember it off-hand.
I'm personally not sure about this change. It doesn't feel natural to me to do sub-string matching. If I search for "an" to try to find "Anna," I don't want "Brian" to show up. It's not at all what I would expect to come up. People don't tend to think in terms of matches in the middle of a name.
Remind me what the use-case is that we're trying to solve here?