I need to implement a skill matching feature similar to http://venturocket.com – a candidate enters a list of skills and rates his proficiency for each. You can then search by again entering some skills and the level of expertise you are looking for. The result is a list of candidates ordered by how well their skills match your search.
Example:
Candidate 1 enters skill Java (proficiency 90) and candidate 2 enters Java (50). When I search for Java (60) candidate 2 is a closer match.
This shold also work with multiple skills.
What I’m looking for are pointers to technologies or algorithms that would help me achieve this. My current approach would be to do a range query in a database (e.g. look for Java skills between 45 and 75) and then sort on the client, but that wouldn’t be very fast.
Pass the value that you are checking against in as a parameter for the query and then use the Euclidean Distance (the square of the difference) to sort:
For multiple traits you sum up each of the square differences.
See Wikipedia: Euclidean Distance for a bit more detail (specifically the “Squared Euclidean Distance” section). Note that this answer is actually DanRedux’s (see comments/edits).