what is the best way to analyze user raw query and detect what who want to search
- by Sadegh
hi, i am developing a very basic prototype of web search engine and now i want to know what is the best way to analyze user raw query and detect what who want to search. like Google, Bing, Yahoo etc...
an example user query is something like this:
Google+Maps+"South+Africa"+Brasil+OR+Italy+OR+Spain+-Argentina+Netherland
and i want to splite this to a generic list of each term(single) like this:
IEnumerable<KeyValuePair<TermType, string>>
<TermType.All, "Google">
<TermType.All, "Maps">
<TermType.Exact, "South">
<TermType.Exact, "Africa">
<TermType.Any, "Brazil">
<TermType.Any, "Italy">
<TermType.Any, "Spain">
<TermType.None, "Argentina">
<TermType.None, "Netherland">
i don't want complete code, i want guidance, solution, tips or anything that's help me to write best for anylize user raw query.
thanks in advance