Provides classes related to constructing and performing Content Engine searches. The SearchSQL class is a helper class for query construction. The SearchScope class performs a constructed query on properties, objects, or class metadata.


Classes

  Class Description
Public class SearchScope Determines which repository or repositories are to be searched, and supplies methods to execute searches for properties, objects, and class metadata (class descriptions).

When multiple repositories are to be searched, use the SearchScope(ObjectStore[], MergeMode) (broken link "!:FileNet.Api.Query.SearchScope(IObjectStore[] objectStores, MergeMode mergeMode)") to specify whether the scope is the union or intersection of the object stores.

This class cannot be inherited.
Public class SearchSQL A helper class used to assist in building valid SQL statements.

An instance of this class is passed in to the SearchScope.FetchObjects and SearchScope.FetchRows methods to perform a query.

The SearchSQL class can be used in either of the following ways:

  • Use the helper methods to specify the parts of the SQL statement. For example, use SetFromClauseInitialValue to set the name of the class being searched, SetSelectList to set the names of the properties to include, and SetWhereClause to specify what to search for. When the SearchSQL instance is passed in as an argument to SearchScope.FetchRows, the complete SQL statement string is constructed out of the parts supplied by the calls to the SearchSQL helper methods. You also can get the complete SQL statement string constructed by calling the ToString method.
  • Pass in a complete SQL statement. If you have the complete SQL statement that needs to be executed, pass the SQL statement into either the SetQueryString method or the SearchSQL(String) constructor. The SearchSQL instance is then complete, and no other SearchSQL method can be called on this instance.

The settings for the following properties can directly affect the search criteria:

  • ObjectStore.DefaultQueryTimeLimit
  • ObjectStore.MaxQueryTimeLimit
  • IServerCacheConfiguration.QueryPageMaxSize
  • IServerCacheConfiguration.QueryPageDefaultSize
  • IServerCacheConfiguration.NonPagedQueryMaxSize
Note
Date/Time values in queries are evaluated with respect to the Content Engine server clock. If the client and server clocks are not in sync, be careful when translating relative time concepts into absolute times. For example, specifying a value that means "within the last 5 minutes" on the client will translate to a comparison to an absolute time in the SQL query, which may not mean "within the last 5 minutes" relative to the server clock.

Interfaces

  Interface Description
Public interface IRepositoryRow Used by search operations to access rows from the repository database. Each row contains a collection of properties, returned as a Properties object.

A RepositoryRow object is similar to an EngineObject object. However, a RepositoryRow object cannot be used for updates, and it may contain multiple, identical properties. For example, each RepositoryRow object in the RepositoryRowSet collection returned as the result of the query "select Id as x, Creator as x from Document" would have two copies of the property "x". In this case, you would need to use the IProperties.ToArray method to get both values.