How to implement a basic query management and recommendation system I'm trying to prototype a system where given a textual query (e.g. a question), I get a list of most relevant documents/questions among a pool of available documents/questions (similar to what we see here in Stack Exchange when submitting a question).

One simple idea coming to my mind is to extract important keywords from query, and do matching based on keywords. Or any other ways, maybe through machine learning or data mining approaches.

I am very new to data science, and I believe this is a very basic system. Is there any available light-weight open source project on this? If not, any hints how to do this?
You might want to take a look at the solr project to see if it is a good fit.