1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Show exact match first when searching for user by username in AdminCP

Discussion in 'XenForo Suggestions' started by The Sandman, Sep 24, 2015.

  1. The Sandman

    The Sandman Well-Known Member

    Most often when "searching" for a user in the AdminCP (Home, Users, and Search for Users pages) I already know which user I want - I just want to get to their Edit page. However, even when inputting an exact match for the username the results are shown as an alphabetical list (often multi-page) of usernames which contain the searched "name" anywhere within.

    I'd prefer the results to show the exact match first, then any close matches that contain the searched username letters at the start, then any remaining results that contain the matched username letters within.

    As an example, say I have a user named "Ohn". If I want to navigate to his Edit page in the AdminCP, I type in Ohn. This currently brings up as slew of Johns and Johnnys with a variety of additional names, numbers, and characters appended. You might have to go through several pages of Johns before you get to Ohn.

    So in the example, if I type in Ohn, I'd like to see Ohn shown first in the results, followed by Ohn2 and Ohnny, then the multitudes of Johns and Johnnys.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    I think this is a valid suggestion, but an alternative way to do what you want is to go to List Users and type the user's name into the filter with the prefix match checkbox checked. That should have the same effect.
     
    SneakyDave likes this.
  3. The Sandman

    The Sandman Well-Known Member

    I was going to say sure, but that's two extra clicks away from where I am at the moment - but I just tried it and it actually works the same way as the searches - type in Ohn and you'll get pages of alphabetical results with the Johns and Johnnys first. Only difference is that there is only one page or results with the following noted at the bottom: There are more records matching your filter. Please be more specific. So by putting the exact username in the filter I can never get to the correct user?
     
    Last edited: Sep 24, 2015
  4. Chris D

    Chris D XenForo Developer Staff Member

    Well, it's roughly the same number of clicks...

    As I say, you have to click the "Prefix match" checkbox next to the filter.

    The way in your first post produces:

    upload_2015-9-24_22-16-42.png

    I think you're now doing this, with the filter:

    upload_2015-9-24_22-17-22.png

    But if you just click "Prefix match" you get:

    upload_2015-9-24_22-17-47.png
     
    SneakyDave likes this.
  5. The Sandman

    The Sandman Well-Known Member

    And how about adding a "prefix match" check box to the rest of the AdminCP User Search facilities?
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    It simply means that what you're searching for must be prefixed with exactly what you have typed.

    So if you had users John, Ohn, Ohn2, Ohn3 then all but John would be shown because all of the others are prefixed with "Ohn".

    That would be one solution, yes. But for now, there is a solution with the same effect, at least :)
     
    SneakyDave likes this.
  7. Martok

    Martok Well-Known Member

    Actually that is a definition of prefix.

    http://www.oxforddictionaries.com/definition/english/prefix
     
  8. Martok

    Martok Well-Known Member

    Um, yes.

    You are referencing the second definition of prefix that I linked to. The first that I quoted is a complete definition.

    Do feel free to contact the Oxford English Dictionary if you think they are wrong. ;)
     
    SneakyDave likes this.
  9. Jeremy P

    Jeremy P Well-Known Member

    The Sandman likes this.
  10. Jeremy P

    Jeremy P Well-Known Member

    Well, the linguistic definition is not "wide" enough in scope to account for the other definitions, as this misunderstanding spells out. In that sense, it is relatively "narrow." Perhaps that is too strong a word, and maybe I should have used a word like "limited" instead... but then we're back at the issue of scrutinizing the use of words whose exact meaning and scope can be slightly ambiguous (which comes across as a bit condescending, by the way).

    Nevertheless, for what it's worth, I agree with your suggestion that the ACP Search should have such functionality.
     
    Steve F likes this.
  11. The Sandman

    The Sandman Well-Known Member

    If you do implement this at some point, I'd also suggest having the check box checked as the default setting (or have an option switch so that each admin can set their own default).
     
  12. Alfa1

    Alfa1 Well-Known Member

    What I find weird about it is that if you search for a user in admincp then this will show you matching membernames. When you click on the use you want, you are not taken to the accounr but rather a search results page for the string you entered. This is counterintuitive and almost seems to be a bug.
     
    semprot, Xon and The Sandman like this.
  13. Biker

    Biker Well-Known Member

    Big time. Especially if the string is common and the name you want ends up being on page 5 out of a 10 page result. Aggravating, to say the least.
     
    Alfa1 and The Sandman like this.
  14. AndyB

    AndyB Well-Known Member

    I suggest not using the "Search for Users" link, instead use the search box to the right as seen here:

    pic001.jpg

    The dropdown will work as you want with prefix priority and you can quickly find the exact member.
     
  15. Chris D

    Chris D XenForo Developer Staff Member

    That doesn't find an exact member, either.
     
  16. Alfa1

    Alfa1 Well-Known Member

    Chris, would you consider the issue I raise anove to be a bug?
     
  17. Mike

    Mike XenForo Developer Staff Member

    Not really, that is just a general search -- it's the same as searching by username which doesn't have exact match support. The click just fills the text box. Given that we have no concept of exact username search in these cases, the main "fix" would be to remove the autocomplete stuff entirely from that section and I don't think that's necessarily helpful.
     
  18. Chris D

    Chris D XenForo Developer Staff Member

    Indeed.

    I would suggest that for most username searches, the general search then filtering that down using the filter and prefix match should be sufficient.
     
  19. Digital Doctor

    Digital Doctor Well-Known Member

    That is exactly what should happen.

    When admins are using this "search" .... it isn't true searching - it is retrieving - as the admin knows exactly what they are looking for.
     
  20. David Bott

    David Bott Member

    Old thread, but new Xenforno user having just converted two sites and found this to me a thing like "What the Heck?" I was doing what I thought was right...I go to users, I use the search box, I type in the user name, in this case Rick, and I SEE HIS AVATAR as the first person in the drop down. I think "This is great!" only then to click on his and then get many pages of search results that I then need to look through.

    IMHO, really poor use of a search box. Finding this old thread I am shocked it has not been updated/fixed/corrected already.

    (Coming from using Sphinx, Xenfono site search etc is very poor and our users are not happy with the results. The biggest issue with this is that it look at THREAD START date and not last post date in a thread. As such, you have have a very old thread, with LOTS of info that is still active and yet it will pull up a new thread with two posts before it with the better thread way down in the list. I degrees, this is for another topic. However the above user search is still not right IMHO. :))
     
    Digital Doctor likes this.

Share This Page