With relational databases, you are pretty much left with a search-string (LIKE), which may not be flexible enough, and also works (efficiently) with short columns (like a heading).
Thus, you probably need to use a full-text search engine (e.g. Lucene). In this case, a full-text search index outside the database will be used to search for keywords.
Some relational databases have optional full-text search capabilities for their text columns. Using them, you can send your full-text queries using SQL (and even combine it with queries on other columns). In Oracle, it looks like
SELECT id FROM table WHERE CONTAINS(text_column, 'java AND text', 1) > 0;
Thilo source share