OpenWGA 7.10 - TMLScript reference

Lucene
Method :

highlightItem(name, prefix, suffix [, encode])

On object Lucene
Usage Returns an item of the current context document, highlighting found terms of the last lucene search
Description This is a TMLScript way to put out items of a lucene search result while highlighting the found terms. It combines the functionalitites of <tml:item> and its attributes highlight, highlightprefix and highlightsuffix.

Additionally it allows to encode the item before the highlighting prefix and suffix are applied.

This method will only work when the document of the chosen context was directly retrieved from a lucene search result.

For backward compatibility there still is a method "highlightItem()" available on TMLContext whose use is discouraged since OpenWGA 5.3.

Parameters name (String):
Name of the item to return

prefix (String):
HTML code that is added before each found lucene term

suffix (String):
HTML code that is added after each found lucene term

encode (String, optional):
A WebTML encoding in which the item text is encoded before the prefix and suffixes are applied. Accepts alle encodings that are available to the OpenWGA runtime