Property-based criteria

Content Platform Tenant Management Help

Version
9.7.x
File Size
4269 KB
Audience
anonymous
Part Number
MK-95HCPH002-19

Property-based criteria let you query for objects based on specified object property values. The format for a simple property-based criterion is:

property:value

For example, this expression finds objects that are on hold:

hold:true

When querying for a value that’s a negative number, enclose the value in double quotation marks ("). For example, this query expression finds objects with the retention setting -2:

retention:"-2"

The special property based criterion *:* matches all objects in all namespaces searchable by the user.

Boolean operators with property-based criteria

You can precede a criterion or an individual property value with one of these Boolean operators:

Plus sign (+)
Objects in the result set must contain the criterion or value following the plus sign.
Minus sign (-)
Objects in the result set must not contain the criterion or value following the minus sign.

For example, this query expression finds objects that are not on hold:

-hold:true

Multiple values for a single property

A property-based criterion can specify multiple values for a single property. To specify multiple values, use this format:

property:([+|-]value [[+|-]value]...)

In this format, the parentheses are required.

For example, this query expression finds objects in either the HlthReg-107 or HlthReg-224 retention class:

retentionClass:(HlthReg-107 HlthReg-224)

This query expression finds objects with custom metadata that contains the string finance but not the string foreign.

customMetadataContent:(+finance -foreign)

When you specify multiple values for a single property, you can combine values that are preceded by Boolean operators with values that do not have Boolean operators. In this case, objects that match the property values that are not preceded by Boolean operators may or may not appear in the result set, but objects that match the terms without Boolean operators are sorted higher in the query results than objects that don’t match those terms.

For example, this query expression finds objects that have custom metadata that contains both the terms quarterly report and accounting department or only the term quarterly report:

customMetadataContent:(+"quarterly report" "accounting department")

Objects that contain both terms are sorted higher in the query results.

Value ranges

You can query based on ranges of values for properties with numeric, string, or date data types. These properties are accessTime, accessTimeString, changeTimeString, dpl, hash, hashScheme, ingestTime, ingestTimeString, retention, retentionClass, retentionString, size, updateTime, updateTimeString, and utf8Name. You can also query based on ranges for content properties with numeric, string or date data types.

Criteria that query for a range of values can have either of these formats:

  • For a range that includes the start and end values:
    property:[start-valueTOend-value]

    In this format, the square brackets are required.

    For example, this query expression finds objects that were ingested from 0800 through 0900 UTC on March 1, 2012, inclusive:

    ingestTimeString:[2012-03-01T08:00:00-0000 TO 2012-03-01T09:00:00-0000]
  • For a range that does not include the start or end values:
    property:{start-valueTOend-value}

    In this format, the curly braces are required.

    For example, this query expression finds objects that have names that occur alphabetically between Brown_Lee.xls and Green_Chris.xls, exclusive of those values:

    utf8Name:{Brown_Lee.xls TO Green_Chris.xls}
Note: utf8Name property values are case sensitive and are ordered according to the positions of characters in the UTF-8 character table.

You can mix square brackets and curly braces in an expression. For example, this query expression finds objects that were ingested from 0800 to 0900 UTC on March 1, 2012, including objects that were ingested at 0800 but excluding objects that were ingested at 0900:

ingestTimeString:[2012-03-01T08:00:00-0000 TO 2012-03-01T09:00:00-0000}

When querying for a range of property values, you can precede the whole criterion with a Boolean operator but you cannot precede an individual value with a Boolean operator. For example, the query expression on the first line is valid; the criterion on the second line is not:

Valid:+retentionString:[2013-07-01T00:00:00 TO 2013-07-31T00:00:00]
Invalid: retentionString:[+2013-07-01T00:00:00 TO 2013-07-31T00:00:00]

When querying for a range of values, you can replace a value with an asterisk (*) to specify an unlimited range. For example, this query expression finds objects with a size equal to or greater than two thousand bytes:

size:[2000 TO *]

This query expression finds objects with change times before 9:00 AM, March 1, 2012 in the local time zone of the HCP system:

changeTimeString:[* TO 2012-03-01T09:00:00}

Wildcard characters in property-based searches

You can use the question mark (?) and asterisk (*) wildcard characters when specifying values for these object properties:

  • customMetadataContent
  • hash
  • hashScheme
  • retentionClass
  • objectPath
  • utf8Name
  • content properties

For example, this query expression finds objects assigned to any retention class starting with HlthReg, such as HlthReg-107 or HlthReg-224:

retentionClass:HlthReg*

The question mark and asterisk characters do not function as wildcards when included within double quotation marks (").

Wildcards are not valid at the beginning of a property value. For example, the query expression on the first line is valid; the query expression on the second line is not:

Valid: utf8Name:princ* 
Invalid: utf8Name:*cipal