OpenWGA 5.4 - TMLScript reference


Object:

Lucene

Description

The "Lucene" object provides functionalities related to fulltext search in TMLScript.

Each Lucene object is constructed with a TMLContext as reference which determines a context for all lucene operations.

Retrieval WGA.lucene()
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Properties and methods
Name Purpose
bestFragments(itemname, fragmentSize, maxFragments [, prefix] [, suffix] [, encode]) Returns those parts of an items value that matched a lucene search
highlightItem(name, prefix, suffix [, encode]) Returns an item of the current context document, highlighting found terms of the last lucene search
highlightMeta(name, prefix, suffix [, encode]) Returns a metadata field of the current context document, highlighting found terms of the last lucene search
search(phrase [, scope [, params]]) Executes a lucene fulltext query
removeQuery() Removes the data of the last lucene query with activated result highlighting from the users session