I don't know of any code snippits, but it is rather simple, yes.
First you should look at some search engine sites in their 'how to use advanced search' pages. You'll find that the syntax to use for a text search is pretty standard.
Once you've done that you can piece it together with code pretty easily. Look at www.sqlcourse.com for all the syntax you could conseivable need.
With just AND, OR, and LIKE, you can do most of what you want to do.