With some exceptions, the syntax for background search queries must conform to the standard syntax for Content Platform Engine queries. The exceptions concern aliasing, parameter variables, and aggregate functions.
For more examples of queries and query syntax, see the sample reports that accompany the Reporting Enablement Extensions add-on. For information about these sample reports, see Reporting Base Class and Subclasses.
Aliasing |
The AS keyword syntax can be used to explicitly indicate the search result property for an item in the SELECT clause. In this example, d.Name is mapped to the search result property docName. This explicit mapping is called aliasing. The selected item can be a reference to a property or function. Aliasing is optional except for some system properties. In the absence of aliasing, the selected item is implicitly mapped to a search result property with the same name as the item. Data coercion involves the conversion of data from one data type to another. For the supported data coercions, the data types of the selected item and of the search result property can be different. |
---|---|
Parameter variables |
Parameter variables can be declared with an at sign (@) at the beginning and end of the variable name. In this example, Doc_Title_Name is a parameter variable. |
Aggregate functions |
Some aggregate functions are supported for use with the GROUP BY clause. In this example, COUNT is an aggregate function. |