Syntax

In the Syntax section, we will cover:

  • Asset context syntax
  • Field formatting rules
  • Text search terms

Asset Context Syntax

This section provides a detailed specification for the syntax used to reference assets with a parent-child asset hierarchy.

The current syntax for asset hierarchy expressions is as follows:

Expressions

The final asset(s) included by a context hierarchy expression can be instances of either group assets or file assets. If the expression is invalid syntactically or does not validate against the asset content hierarchy (e.g. a group asset specific expression is used against a file asset) the result of the expression calculation will return an empty collection rather than an error.

Table 1.
Symbol Definition
/ / Expression path separator.
. . The current asset.
.. Parent file.
{..} Parent group.
* Current asset if file asset, all member assets if iterator asset group.
{2} Reference to 3rd member of an asset group (index starts from zero).
{overlay} Reference to a named group member (name of membership).
TRANSCODE All file assets with transcode creation context.
PROXY All file assets with proxy creation context.
INGEST All file assets with ingest creation context.
PROXY[1] Reference to 2nd file asset with proxy creation context (index starts from zero).
PROXY[0..2] Reference to a range of file assets with proxy creation context
TRANSCODE[web_hi] Reference to a particular transcode via its reference name.

Absolute References

It is possible to specify the Id of an asset as asset hierarchy expression to refer absolutely to an asset that may not be in the same parent/child or group/member hierarchy that the current asset is within. As an example:

  • 101249

Implicit Iterator Asset Group

It is possible to define an asset hierarchy expression that consists of multiple comma-separated sub-expressions wrapped within braces. The braces and commas act as a means of defining an implicit iterator group where the result of each sub- expression evaluation is added to an overall group of resulting assets. Some examples:

  • {101249,.}
  • {101249,./TRANSCODE}
  • {101249,./TRANSCODE[1..3]}

Note: The last two examples above result in an implicit iterator group where one of the members is an implicit iterator group

Implicit Aggregate Asset Group

It is possible to define an asset hierarchy expression that consists of multiple colonseparated sub-expressions wrapped within braces. The braces and colons act as a means of defining an implicit aggregate group where the result of each subexpression evaluation is added to an overall group of resulting assets. Some example:

  • {101249:.}
  • {101249:./TRANSCODE}
  • {101249:./TRANSCODE[1..3]}

Notes:

  • The last two examples above result in an implicit aggregate group where one of the members is an implicit iterator group.
  • It is not possible to implicitly define an aggregate group without the use of colon expressions i.e. there is no equivalent to the following that creates an implicit aggregate group:

Named Memberships in Implicit Groups

It is possible to define an asset hierarchy where the sub-expressions used to define an implicit asset group are able to define the membership name. The subexpression should take the form of:

membership_name=asset_sub-expression

Some examples:

  • {bumper=101249,main=.}
  • {bumper=101249,to_publish=./TRANSCODE}
  • {bumper=101249,to_publish=./TRANSCODE[1..3]}
  • {bumper=101249:main=.}
  • {bumper=101249:to_publish=./TRANSCODE}
  • {bumper=101249:to_publish=./TRANSCODE[1..3]}

Further Examples

The following refers to all child transcoded (TRANSCODE creation context) file assets. If the current asset being published is a file asset, this means all child transcodes of the current asset. If the current asset being published is a group asset, this means all child transcodes of each member of the current asset.

*/TRANSCODE

The following refers to the first child transcoded (TRANSCODE creation context) file asset. If the current asset being published is a file asset, this means the first child transcode of the current asset. If the current asset being published is a group asset, this means the first child transcode of each member of the current asset.

*/TRANSCODE[0]

The following refers to the first member asset of the third member asset. This assumes that the current asset is a group asset and the third member of this group asset is also a group asset. If this is not the case, no assets will be included by this expression.

{2}/{0}

Field Formatting Rules

Some fields in Ooyala Flex support the entry of special characters to specify formatting rules. Example of areas where this is used is in the metadata number, date and type fields.

The following formatting rules can be applied.

Formatting Rules for Number Values

Many characters in a pattern are taken literally; they are matched during parsing and output unchanged during formatting. Special characters, on the other hand, stand for other characters, strings, or classes of characters. They must be quoted, unless noted otherwise, if they are to appear in the prefix or suffix as literals.

Table 2.
Symbol Location Localized Meaning
0 Number Yes Digit
# Number Yes Digit, zero shows as absent
. Number Yes Decimal separator or monetary decimal separator
- Number Yes Minus sign
, Number Yes Grouping separator
E Number Yes Separates mantissa and exponent in scientific notation. Need not be quoted in prefix or suffix
; Subpattern boundary Yes Separates positive and negative subpatterns
% Prefix or suffix Yes Multiply by 100 and show as percentage
\u2030 Prefix or suffix Yes Multiply by 1000 and show as per mille value
(\u00A4) Prefix or suffix No Currency sign, replaced by currency symbol. If doubled, replaced by international currency symbol. If present in a pattern, the monetary decimal separator is used instead of the decimal separator.
' Prefix or suffix No Used to quote special characters in a prefix or suffix, for example, "'#'#" formats 123 to "#123". To create a single quote itself, use two in a row: "# o''clock".

Examples:

Table 3.
Output Explanation
123,456.789 The pound sign (#) denotes a digit, the comma is a place holder for the grouping separator, and the period is a place holder for the decimal separator.
123456.79 The value has three digits to the right of the decimal point, but the pattern has only two. The format method handles this by rounding up.
000123.780 The pattern specifies leading and trailing zeros, because the 0 character is used instead of the pound sign (#)
$12,345.67 The first character in the pattern is the dollar sign ($). Note that it immediately precedes the leftmost digit in the formatted output.
¥12,345.67 The pattern specifies the currency sign for Japanese yen (¥) with the Unicode value 00A5.

Formatting Rules for Date and Time Values

Table 4.
Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -0800

Examples:

Table 5.
Date and Time Pattern Result
"yyyy.MM.dd G 'at' HH:mm:ss z" 2001.07.04 AD at 12:08:56 PDT
"EEE, MMM d, ''yy" Wed, Jul 4, '01
"h:mm a" 12:08 PM
"hh 'o''clock' a, zzzz" 12 o'clock PM, Pacific Daylight Time
"K:mm a, z" 0:08 PM, PDT
"yyyyy.MMMMM.dd GGG hh:mm aaa" 02001.July.04 AD 12:08 PM
"EEE, d MMM yyyy HH:mm:ss Z" Wed, 4 Jul 2001 12:08:56 -0700
"yyMMddHHmmssZ" 010704120856-0700
"yyyy-MM-dd'T'HH:mm:ss.SSSZ" 2001-07-04T12:08:56.235-0700

Text Search Terms

Below is a comprehensive list of the terms you can use for text searches. These terms can be used in any general search field (global search field and dashboardspecific search fields). In addition it can be used in the "Search For" field in the advanced search screens.

Terms

A query is broken up into terms and operators. There are two types of terms: single terms and phrases. A single term is a single word such as "test" or "hello". A phrase is a group of words surrounded by double quotes such as "hello dolly". Multiple terms can be combined together to form a more complex query.

Fields

You can search any field by typing the field name followed by a colon ":" and then the term you are looking for. As an example, let's assume your query contains two Ooyala Flex Object fields, Name and Description and text is the default field. If you want to find the object entitled "The Right Way" which contains the description "don't go this way", you can enter:

Name: “The Right Way” AND Description: go

Or

Name: “Do it right” AND right

Notes:

  • Since description is the default field, the field indicator is not required.
  • The field is only valid for the term that it directly precedes, so the query.

Wildcard Searches

Ooyala Flex searches supports single and multiple character wildcard searches within single terms (not within phrase queries). To perform a single character wildcard search use the "?" symbol. To perform a multiple character wildcard search use the "*" symbol. The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

te?t

Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

test*

You cannot use a * or ? symbol as the first character of a search.

Fuzzy Searches

Ooyala Flex supports fuzzy searches. To do a fuzzy search use the tilde, "~", symbol at the end of a single word term. For example to search for a term similar in spelling to "roam" use the fuzzy search:

roam~

This search will find terms like foam and roams. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:

roam~0.8

The default that is used if the parameter is not given is 0.5.

Proximity Searches

Ooyala Flex supports finding words that are within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for "Ooyala Flex" and "Workflow" within 10 words of each other in a object use the search:

“Ooyala Flex Workflow”~10

Range Searches

Range Queries allow you to match Ooyala Flex objects whose field(s) values are between the lower and upper bound specified by the range query. Range queries can be inclusive or exclusive of the upper and lower bounds.

Created: [20020101 TO 20030101] This will find objects whose created fields have values between 20020101 and 20030101, inclusive.

Range queries are not reserved for date fields. You could also use range queries with non-date fields:

Name: [Aida To Carmen]

This will find all objects whose names are between Aida and Carmen, but not including Aida and Carmen. Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by curly brackets.

Boosting a Term

Ooyala Flex provides the relevance level of matching objects based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

Boosting allows you to control the relevance of a Ooyala Flex object by boosting its term. For example, if you are searching for:

Media Asset

and you want the term "Media" to be more relevant, boost it using the ^ symbol along with the boost factor next to the term. You would type:

Media ^4 Asset

This will make objects with the term media appear more relevant. You can also boost phrase terms as in the example: “Media Asset “^4 “Transfer Agent” By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)

AND

The AND query matches objects where both terms exist anywhere in the text of a single object. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

To search for Objects that contain "Transcode" and "Images" use the query:

“Transcode” AND “Images”

+

The "+" requires that the term after the "+" symbol exist somewhere in the field of a single object.

To search for objects that must contain "Asset" and may contain "Ooyala Flex" use the query:

+Asset Ooyala Flex

NOT

The NOT query excludes objects that contain the term after NOT. The symbol "!" can be used in place of the word NOT.

To search for objects that contain "Ooyala Flex" but not "Transfer Agent" use the query:

“Ooyala Flex” NOT “Transfer Agent”

The NOT query cannot be used with just one term.

-

The "-" excludes objects that contain the term after the "-" symbol. To search for objects that contain "Ooyala Flex" but not "Transfer Agent" use the query: “Ooyala Flex” – “Transfer Client”

Grouping

Ooyala Flex supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query. To search for either "Ooyala Flex" or "Transfer Agent" and "Software" use the query:

(Ooyala Flex OR Transfer Agent) AND Software

This eliminates any confusion and makes sure you that term "Software" must exist and either term "Ooyala Flex" or "Transfer Agent" may exist.

Field Grouping

Ooyala Flex supports using parentheses to group multiple clauses to a single field. To search for a title that contains both the word "return" and the phrase "pink panther" use the query:

Title :(+return +"pink panther")

Escaping Special Characters

Ooyala Flex supports escaping special characters that are part of the query. The current list of special characters are

+ - && || ! ( ) { } [] ^ " ~ * ? : \

To escape these character use the \ before the character. For example to search for (1+1):2 use the query:

\ (1\+1\) \:2

Was this article helpful?