The like operator selects documents that are similar to the documents or passages you provide. The search engine analyzes the text to find the most important terms to use. If you specify multiple samples, the search engine selects important terms that are common across the samples. Each result is relevance-ranked.
The like operator accepts a single operand, called the query-by-example (QBE) specification. The QBE specification can be either literal text or document IDs. The document IDs are from the IDENTITY column in the source table. For example, to select documents that are similar to the document in the copy column in the row with an IDENTITY of “2”, enter:
select t1.score, t2.copy from i_blurbs t1, blurbs t2 where t1.id=t2.id and t1.score > 35 and t1.index_any = ’<like> ( "{2}" )’
Before using literal text in the QBE specification, you must uncomment the following line in the style.prm file:
$define DOC-FEATURES "TF"
See “Enabling query-by-example, summarization, and clustering”.
See the sample script named sample_text_queries.sql in the $SYBASE/$SYBASE_FTS/sample/scripts directory for examples of SQL statements using QBE.