Sweep filter conditions
A filter condition narrows the scope of a sweep to include only objects that meet specific criteria. The criteria is expressed in terms of properties and values of the objects that are targeted by the sweep. The syntax is a subset of the SQL syntax for the WHERE clause.
Here are examples of filter conditions:
Goal | Filter condition example |
---|---|
All superseded documents | VersionStatus = 4 |
All documents that were created at least a year ago | DateCreated < NOW() - TimeSpan(365, 'Days') |
All content in a specific storage area | StorageArea = OBJECT('{5E2BE09A-F4B1-49E2-A229-77FE32E5FEF1}') |
Complex logical expression | VersionStatus = 4 AND DateCreated < NOW() - TimeSpan(365, 'Days') AND ContentSize > (1024 * 1024 * 500) |
By default, job sweeps and policy sweeps retrieve a database row before it evaluates the filter conditions for that row. Using the FilteredQueryTimeout property, you can optimize sweep performance.