what is the best way to analyze user raw query and detect what who want to search

Posted by Sadegh on Stack Overflow See other posts from Stack Overflow or by Sadegh
Published on 2010-06-13T02:39:18Z Indexed on 2010/06/13 2:42 UTC
Read the original article Hit count: 279

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about search-engine