I can see two problems with this:<p>-- A naive linear scan for a lookup will not scale as the size of your database grows larger. You should be looking into space-partitioning trees, or approximate methods like locality-sensitive hashing.<p>-- Euclidean distance is a terrible metric for kNN on non-metric spaces, which is what your movie example is. It will also be beaten to a pulp by the Curse of Dimensionality: <a href="http://en.wikipedia.org/wiki/Curse_of_dimensionality#Distance_functions" rel="nofollow">http://en.wikipedia.org/wiki/Curse_of_dimensionality#Distanc...</a>
Alike is a versatile light-weight kNN/similarity library that can be useful for many Machine Learning projects. Whether you are building a recommendation system, or an optimization model, comparing objects is pervasive -- feedback welcome!