abstract

Generate an abstract of a given portion of text. The syntax is

   abstract(text[, maxsize[, style[, query]]])

The abstract will be less than maxsize characters long, and will attempt to end at a word boundary. If maxsize is not specified (or is less than or equal to 0) then a default size of 230 characters is used.

The style argument is a string or integer, and allows a choice between several different ways of creating the abstract. Note that some of these styles require the query argument as well, which is a Metamorph query to look for:

  • dumb (0) Start the abstract at the top of the document.

  • smart (1) This style will look for the first meaningful chunk of text, skipping over any headers at the top of the text. This is the default if neither style nor query is given.

  • querysingle (2) Center the abstract contiguously on the best occurence of query in the document.

  • querymultiple (3) Like querysingle, but also break up the abstract into multiple sections (separated with "...") if needed to help ensure all terms are visible. Also take care with URLs to try to show the start and end.

  • querybest An alias for the best available query-based style; currently the same as querymultiple. Using querybest in a script ensures that if improved styles become available in future releases, the script will automatically "upgrade" to the best style.

If no query is given for the query... modes, they fall back to dumb mode. If a query is given with a non-query... mode (dumb/smart), the mode is promoted to querybest. The current locale and index expressions also have an effect on the abstract in the query... modes, so that it more closely reflects an index-obtained hit.

     SELECT     abstract(STORY, 0, 1, 'power struggle')
     FROM       ARTICLES
     WHERE      ARTID = 'JT09115' ;


Copyright © Thunderstone Software     Last updated: Mar 10 2017
Copyright © 2017 Thunderstone Software LLC. All rights reserved.