OpenWGA 7.9 - TMLScript reference
LuceneMethod :
getFieldIndexType(name)
On object | Lucene |
Usage | Returns the FieldIndexType for a specific field name |
Description |
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. |
Parameters |
name (String): Item name |
Return value | A FieldIndexType object |
Allowed in script types |
|
Examples |
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)" } |