postgres text search code example
Example: postgresql full text search
Full Text Searching (or just text search) provides the capability to
identify natural-language documents that satisfy a query, and optionally
to sort them by relevance to the query. The most common type of search is
to find all documents containing given query terms and return them in
order of their similarity to the query. Notions of query and similarity
are very flexible and depend on the specific application. The simplest
search considers query as a set of words and similarity as the frequency
of query words in the document.