The current version search does a basic contains, but that means if you search for just the first part of a version number you get all sorts of matches that don’t apply that just have that number somewhere in the middle of the version.
A simple fix would be to change the search to be a “starts with” search.
A more complex fix would be to allow users to type semver ranges in the search and use the semver library to see what versions satisfy those ranges. That would make 5 automatically match 5.x.x but also would let a user search for things like > 5.0 or 4-snapshot