I'd advise you to read at least the following three books:
1) Speech & Language Processing (http://www.cs.colorado.edu/~martin/slp.html) by Daniel Jurafsky & James Martin 2) Foundations of Statistical Natural Language Processing by Manning & Schuetze (http://nlp.stanford.edu/fsnlp/) 3) Introduction to Information Retrieval by Manning, Raghaven & Schuetze (http://nlp.stanford.edu/IR-book/information-retrieval-book.html)
Your problem is not that trivial as it may probably seem to you. In addition, you have to at least take into consideration the idiosyncrasies of each language you'd like your search algorithm to work with.