Have you looked into using EQS? It performs exactly this function, giving a score to objects based on your criteria.