OpenWGA 7.7 - TMLScript reference

Method :


On object Lucene
Usage Returns the FieldIndexType for a specific field name

Use this method to find out about the lucene index configuration for a specific item name. It will lookup the lucene indexing rule that matches the given item name and returns its information as FieldIndexType object. 

The lucene rules used are those from the OpenWGA application that the current Lucene object has in context.


name (String):

Item name

Return value FieldIndexType object
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events

Finding out if an item of name "state" would be indexed "sortable".  Note that the rule defining this index type does not need to match the item name completely. It may be a rule which only matches the item name beginning or the default rule:

if (WGA.lucene().getFieldIndexType("state").sortable) {

  options = "sort:state(asc)"


else {

  options = "sort:LASTMODIFIED(asc)"