I'd like to implement a search function on my site that let's people enter their question and then selects the best answer, from those I've put into my database, according to which of the answers contains the most words from the question. At least that would be an initial approach to it.
I'm striving for a certain amount of artificial intelligence here so I'm thinking that there may be programs, modules, techniques, etc. already out there that will take this a step farther and make a decision based on criteria more sophisticated than which answer contains the most words from the question. If I can capture the query the user entered into the search engine to reach my page, I could perhaps get some extra context from that.
Thanks for any ideas.