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.

ToggleClasses

Type ClassDescription
Public classSearchScope
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(objectStores, mergeMode) constructor to specify whether the scope is the union or intersection of the object stores.

Public classSearchSQL
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
  • ObjectStore.QueryDatabaseTimeout
  • IServerCacheConfiguration.QueryPageMaxSize
  • IServerCacheConfiguration.QueryPageDefaultSize
  • IServerCacheConfiguration.NonPagedQueryMaxSize
  • IServerCacheConfiguration.QueryCountDefaultSize
  • IServerCacheConfiguration.QueryCountMaxSize
Note 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.
Public classSearchTemplateContent
Identifies the content search settings in a search template that can be modified for runtime purposes, and enables you to choose whether the search template settings or the property values specified for this class are to be used for the search.

The SearchTemplate* classes (those classes prefixed with "SearchTemplate") enable you to control and specify runtime modification of search template data.

Public classSearchTemplateContentItem
Identifies the content search item settings in a search template that can be modified or excluded for runtime purposes, and enables you to choose whether the search template settings or the property values specified for this class are to be used for the search.

The SearchTemplate* classes (those classes prefixed with "SearchTemplate") enable you to control and specify runtime modification of search template data.

Public classSearchTemplateFolder
Identifies the folder in a search template that is to be modified or excluded, or a new folder that is to be added to the search. Methods are provided to supply new values to a folder being modified.

The SearchTemplate* classes (those classes prefixed with "SearchTemplate") enable you to control and specify runtime modification of search template data.

Public classSearchTemplateParameters
Identifies the search parameters in the search template that can be modified, excluded or added to for runtime purposes, and enables you to choose whether the search template settings or the property values specified for this class are to be used for the search. The search parameters specified for an instance of this class are used for execution of the Stored Search query by a SearchScope object.

The SearchTemplate* classes (those classes prefixed with "SearchTemplate") enable you to control and specify runtime modification of search template data.

Public classSearchTemplateSelectProperty
Identifies the select list property in a search template that is to be modified or excluded, or a new select list property that is to be added to the search. Methods are provided to supply new values to a select list property being modified.

The SearchTemplate* classes (those classes prefixed with "SearchTemplate") enable you to control and specify runtime modification of search template data.

Public classSearchTemplateSubclass
Identifies the subclass in a search template that is to be modified or excluded, or a new subclass that is to be added to the search. Methods are provided to supply new values to a subclass being modified.

The SearchTemplate* classes (those classes prefixed with "SearchTemplate") enable you to control and specify runtime modification of search template data.

Public classSearchTemplateWhereProperty
Identifies the Where properties in a search template that can be modified or excluded for runtime purposes, and enables you to choose whether the search template settings or the property values specified for this class are to be used for the search.

The SearchTemplate* classes (those classes prefixed with "SearchTemplate") enable you to control and specify runtime modification of search template data.

ToggleInterfaces

Type InterfaceDescription
Public interfaceIRepositoryRow
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.

Public interfaceIStoredSearch
Represents the XML query for a stored search or search template. These search criteria are persisted to an object store.

Note: StoredSearch instances are available for use only when the Stored Search Extensions add-on is installed.

A StoredSearch object is identified as a stored search or a search template through the setting of the SearchType property. A stored search or search template can be used to query for the object types: Document, CustomObject, or Folder. The SearchingObjectType property identifies the object type for the query.

Only one object type can be specified per search clause. Each search clause specified in the XML must be handled as an individual query, requiring a separate call to the SearchScope method to execute each search clause.