This shows you the differences between two versions of the page.
dev:sql:functions:context:home [2009/12/04 04:14] tdo created |
dev:sql:functions:context:home [2016/06/28 22:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{page>:top_add&nofooter&noeditbtn}} | ||
- | <html><div align="center"><span style="color:red">DRAFT</span></div></html> | ||
- | ===== $CONTEXT ===== | ||
- | |||
- | The $CONTEXT function is used to retrieve small excerpts from a document containing the search criteria. The $CONTEXT function returns the words adjacent to the criteria, formatting them if requested so that they keywords are easily visible. The $CONTEXT function can return multiple of these contexts in one string, allowing the user to see the various locations which led to an entry being qualified. | ||
- | |||
- | ==== Syntax ==== | ||
- | |||
- | $CONTEXT[(length [,[‘options’] [,’label’]])] | ||
- | |||
- | == length == | ||
- | An optional parameter that controls the length of the string to be returned. If this parameter is not provided, the default size is 256 bytes. | ||
- | |||
- | == options == | ||
- | An optional parameter that controls options for the function. Valid options are: | ||
- | |||
- | == MAXCONTEXTS=n == | ||
- | Limit the number of context excerpts to n. | ||
- | |||
- | == STYLE= == | ||
- | Render the result in the following style: | ||
- | TEXT (default) | ||
- | HTML | ||
- | NONE | ||
- | |||
- | == FORMAT= == | ||
- | Render the result using the following format: | ||
- | COMPRESSED (default) | ||
- | UNCOMPRESSED | ||
- | |||
- | == CLASSES == | ||
- | Use HTML classes so that HTML Style Sheets can be used to determine highlighting characteristics. | ||
- | |||
- | == DISTINGUISH_WORDS == | ||
- | When used with the CLASSES option, use different classes so that each word can have independent highlighting characteristics. | ||
- | |||
- | == DISTINGUISH_DERIVED_WORDS == | ||
- | When used with the CLASSES option, use different classes so that derived words can have independent highlighting characteristics than original words. When used without CLASSES, but with STYLE=HTML, use <st> for original words and <em> for derived words. | ||
- | |||
- | == PRESERVE_FORMAT= == | ||
- | Control whether tabs, linefeeds and other formatting characters are preserved in the output. Set on ON (default when FORMAT=UNCOMPRESSED) or OFF (default when FORMAT=COMPRESSED). | ||
- | |||
- | == HIGHLIGHT=”string” == | ||
- | HTML tag to use to highlight keywords when STYLE=HTML. Defaults to “<strong>”. | ||
- | |||
- | == END_HIGHLIGHT=”string” == | ||
- | HTML tag to use to end the highlighting of keywords when STYLE=HTML. Defaults to the HIGHLIGHT string with an initial backslash, such as “</strong>”. This option is only needed with more complex HIGHLIGHT strings. | ||
- | |||
- | == label == | ||
- | An optional label that describes this particular search. This label is not needed unless multiple $CONTAINS functions are used in the SQL statement. This label refers to the label used in the $CONTAINS function. The label is case-insensitive, and may be up to 32 characters long. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | {{page>:bottom_add&nofooter&noeditbtn}} |