IBM FileNet P8, Version 5.2.1            

Background search query syntax introduction

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.

As shown with an example, here are the exceptions to the standard syntax:
Aliasing
 
SELECT d.Name AS docName
FROM Document d 
WHERE DateCreated < 2014-04-23T12:44:07.1234+02:00

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
SELECT d.Name AS docName 
FROM Document d 
WHERE d.DocumentTitle LIKE @Doc_Title_Name@

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
SELECT Creator AS DocumentCreator, 
COUNT(Id) AS DocumentCount, 
SUM(ContentSize) AS DocumentContentSize 
FROM Document 
GROUP BY DocumentCreator

Some aggregate functions are supported for use with the GROUP BY clause. In this example, COUNT is an aggregate function.



Last updated: March 2016
p8pcc262.htm

© Copyright IBM Corporation 2016.