Asset Search Syntax
The filter functionality in the asset management system of a Model Manager server is based on the same tailor-made search syntax used when searching models and their contents. The syntax enables you to write filter queries that find assets whose built-in fields and attribute fields satisfy arbitrarily complex constraints.
In this section, you will learn how you can formulate such custom filter queries. You will see how to write simple expressions for filters on single asset fields and primitive attribute fields as well as how to nest field expressions using the primitive attribute members of a composite attribute. For more details on the search syntax, see The Model Manager Search Syntax in the Model Manager Reference Manual.
Basic Asset Field Expressions
An asset filter consists of one or more field expressions combined with Boolean operators — for example, AND, OR, and NOT — and other grouping operators. Each field expression specifies which field and what field value is being filtered on.
You write an asset field expression using an @-notation of the general form:
@<field-name>:<field-value>
with <field-name> equal to the name of one of the available asset fields in Table 4-3, and <field-value> the value being filtered on. Write, for example,
@title:crane
to find assets whose title contains the word crane. To match on several search words, enclose the words with parentheses. Write
@title:(mounted crane)
to find assets whose title contains the words mounted and crane.
A space between two search words is automatically interpreted as a Boolean AND. The previous expression is thus equivalent to:
@title:(mounted AND crane)
Write
@title:(mounted OR crane)
if you want to find assets whose title contain mounted or crane.
If you want to combine a full text search with a custom filter query, write the former first. The following is valid:
mounted crane @assetType:project @lastModifiedBy:alice
and matches on assets whose title or description contains the words mounted and crane, whose asset type is Project, and that was last modified by user Alice. The following is not valid:
@assetType:project @lastModifiedBy:alice mounted crane
and results in an error message.
See Basic Field Expressions in the Model Manager Reference Manual.
Table 4-3: Field expressions for Asset fields.
Primitive Attribute Field Expressions
You can filter on primitive attribute fields using a search syntax similar to that of the predefined asset fields:
@<attribute-identifier>:<field-value>
with <attribute-identifier> equal to the identifier of a primitive attribute and <field-value> the value being filtered on. Write, for example,
@status:planned
to find all assets with the value planned for a hypothetical primitive attribute status of Keyword value type. Similarly, the expression
@week_estimate:[5 TO 10]
matches all assets with a range of values for a hypothetical primitive attribute week_estimate of Integer value type.
A primitive attribute field expression only matches on the values of attributes added as top-level attributes to the sections of an asset type. See Composite Attribute Field Expressions for the search syntax used to filter on primitive attributes that are members of composite attributes.
If the attribute identifier is the same as one of predefined field names in Table 4-3, precede the identifier with a backslash. Thus, the field expression @title:<field-value> matches on the title of an asset; the field expression @\title:<field-value> matches on the attribute with identifier title.
For primitive attributes with value types that support filtering on multiple fields, the above syntax automatically targets a default field. For an Attachment it is the filename, for a File version or Model version it is the item version’s title, and for a Link it is the link text. Write, for example,
@product_manual:truck\ mounted\ crane.pdf
to find all assets with an uploaded file truck mounted crane.pdf for a hypothetical Attachment primitive attribute with identifier product_manual.
To match on one of the other fields, write
@<attribute-identifier>{@<field-name>:<field-value>}
with <attribute-identifier> equal to the identifier of the attribute and <field-name> equal to the name of one of the available fields in Table 4-4, Table 4-5, and Table 4-6. Write, for example,
@product_manual{@fileType:pdf}
to find all assets with product manuals of PDF type. You can also combine multiple fields within the curly braces. Write,
@product_manual{@fileType:pdf @lastModified:[* TO 12/31/20]}
to find product manuals of PDF type that were created before 2021.
A similar syntax is used when searching on the fields of File Version, Model Version, or Link attributes. Write, for example,
@auxiliary_data{@itemVersionType:fileset}
to find all assets linking to fileset versions via a hypothetical File Version primitive attribute with identifier auxiliary_data.
Table 4-4: Field expressions for primitive attributes of link value type.
Table 4-5: Field expressions for primitive attributes of attachment value type.
Table 4-6: Field expressions for primitive attributes of linked item version value types.
Composite Attribute Field Expressions
You can filter on primitive attributes that are members of composite attributes using a syntax of the form:
@<composite-identifier>{@<primitive-identifier>:<field-value>}
with <composite-identifier> equal to the identifier of a composite attribute, <primitive-identifier> equal to the identifier of a primitive attribute that is a member of the composite attribute, and <field-value> equal to the value being filtered on. Write, for example,
@journal_reference{@conference:paris @year:2020}
to find all assets with the values Paris and 2020 for the two primitive attributes, conference and year, belonging to the composite attribute journal_reference. This syntax is especially useful when you want to match on multiple cells in a table row corresponding to a composite attribute in Table mode. Write, for example,
@models{@model:(mounted crane) @product_version:11.2}
to find all assets with a table row in a hypothetical models composite attribute table in which the model column has a model version title containing mounted crane, and the product_version column has the value 11.2.
Syntax Errors
The Model Manager server web interface automatically detects if your write an expression in a search or filter input field using a malformed search syntax. A warning banner with a message describing the problem is shown below the input field. The warning banner stays visible until you either correct the problem or click the Close button on the banner.
A common source of error is forgetting to escape reserved characters by preceding them with a backslash (\) when writing search words in the Search field or the Filters menu on the Home page. This includes, for example, parentheses and quote characters. See also Escaping Reserved Characters in the Model Manager Reference Manual.