Use Situation

Whenever a user would go to this site, they'll be faced having a search box similar to SO. They are able to look for results using plan text. ".internet questions", "closed questions", ".internet and java", etc.. The search will function a little different that SO, for the reason that it'll attempt to whenever possible from the schema from the database as opposed to a straight fulltext search. So ".internet questions" is only going to look for .internet questions instead of .internet solutions (most likely not relevant to SO situation, just a good example here), "closed questions" will return questions which are closed, ".internet and java" questions will return questions that report to .internet and java and little else.

Problem

I am much less acquainted with what however i essentially wish to perform a keyword to SQL driven search. I understand the schema from the database i can datamine the database. I wish to know any current approaches there that existing out already before I attempt to implement this. I suppose this is perfect for exactly what is a good design for that mentioned problem.

Suggested

My suggested solution to date looks something similar to this

  1. Clean the input. Just remove any special figures
  2. Parse the input into portions of information. Break a port of "c# java" into c# and java Also handle the special cases like "'c# java' questions" into 'c# java' and "questions".
  3. Develop a tree from the input
  4. Bind the information into metadata. So convert things like closed questions and relate it towards the isclosed column of the table.
  5. Convert the tree right into a sql query.

Ideas/suggestions/links?

What you're searching for is Natural Language Processing. Oddly enough this used to become incorporated free as English Query in SQL Server 2000 and prior. But it is gone now

Another sources are :

The idea is really a meta data dictionary mapping words to table, posts, associations etc as well as an British sentence parser used together to transform a British sentence ( or simply some key phrases) right into a real query

Many people even user British Query with speech recognition for many really awesome demos, never first viewed it utilized in anger though!