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 asset 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 is searched and the field value being searched 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 in the search syntax. 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.
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.
A field expression for a primitive attribute of an Attachment value type matches on the filename. 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 product_manual.
To search on other file properties of an Attachment, write
@<attribute-identifier>{@<field-name>:<field-value>}
with <attribute-identifier> equal to the identifier of the Attachment attribute and <field-name> equal to the name of one of the available fields in Table 4-5. Write, for example,
@product_manual{@fileType:pdf @lastModified:[* TO 12/31/20]}
to find all assets with product manuals of PDF type that were created before 2021.
Table 4-4: Field expressions for primitive attributes of link value type.
Table 4-5: Field expressions for primitive attributes of attachment value type.
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.