Difference between revisions of "Operator Types"

From wiki.searchtechnologies.com
Jump to: navigation, search

For Information on Aspire 3.1 Click Here

m (Protected "Operator Types" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
Line 1: Line 1:
 +
{{qpl-redirect}}
 
{{qpl}}
 
{{qpl}}
 
A special class, OperatorType, exists to represent operator types within the QPL generic query structure.
 
A special class, OperatorType, exists to represent operator types within the QPL generic query structure.

Latest revision as of 17:09, 3 March 2017

This Page is Locked - Content no longer maintained - See QPL for the latest information.
Enterprise Add-On Feature

A special class, OperatorType, exists to represent operator types within the QPL generic query structure.

For example:

 a = and("thomas","jefferson")

In the above example, "a" will be an Operator object which has an OperatorType of "AND".

Naming Standards

Operator types must start with a letter, and are allowed to have the letters a-z, A-Z and "_" (underscore).

Type names, when used in Groovy are specified as ALL CAPS with underscores:

 def BOOST_PLUS = OperatorType.create("BOOST_PLUS");

This is also the representation of the type as stored in the OperatorType class.

Type names when printed out for the user are printed in camelCase:

 boostPlus("abc", "def")

The OperatorType methods will automatically normalize types as needed.

Creating New Operator Types

Use the static create() method to create a new operator type:

 def MY_TYPE = OperatorType.create("myType");

Note that all operator types should have a Groovy variable defined, so it can be used by later code, as necessary.