Using the summary Column to Summarize Documents

Use the summary pseudo column to have queries return only summaries of the documents that meet the search criteria, rather than returning entire documents. The summary column is not available by default; you must edit the style.prm file prior to creating the text index to enable summarization. See “Enabling Query-By-Example, Summarization, and Clustering” for information about enabling the summary column.

For example, the following query returns only summaries of documents that include the words “Iranian” and “book” (in this example, the style.prm file is configured to display 255 characters):

select t1.score, t1.summary
from i_blurbs t1, blurbs t2
where t1.id=t2.id and t1.score > 70
and t1.index_any = "(Iranian <and> book)"
score     summary 
-----    ----------------------------------------------------------- 78    They asked me to write about myself and my book, so here
    goes: I started a restaurant called “de Gustibus” with two
    of my fri 
(1 row affected)

The Full-Text Search engine supports summaries of up to 255 bytes.

For additional examples of queries using summarization, see the sample script sample_text_queries.sql in the $SYBASE/$SYBASE_FTS/sample/scripts directory.