Skip to main content

Searching for assets

You can search for assets whether you are working within Content Hub or Dynamic Content.

On this page we'll show you how to search for assets and cover simple and more advanced searches, including regular expressions and boolean operators.

You can perform basic searches for assets in both Content Hub and the Dynamic Content Assets tab. Basic search allows you to search for strings within the name, srcName and label fields. For example, entering winter into the search box matches assets with that string within any of the three fields, as shown in the example below.

Searching for images with names or labels containing winter

Note that the search is performed only on assets within the current folder.

In Content Hub you can refine your search further using other facets such as: type, folder, last publish status and locale to filter the assets.

Searching for part of a text string
Link copied!

When searching in Content Hub, ensure you find all instances of a partial text string, by using wildcard characters in your search criteria.

For example to find all assets containing glasses as all or part of a string, enter *glasses*. This search finds:

  • red-glasses
  • glasses-with-frames
  • sunglasses
  • glasseswithframes

Searching without the wildcard, only matches assets that contain your search criteria as a complete text string. For example, searching for glasses finds:

  • red-glasses
  • glasses-with-frames

but doesn't find:

  • sunglasses
  • glasseswithframes

It's possible to enter much more advanced searches within the search box and we'll give you some examples in this section.

Regular expressions on name, srcName and label fields
Link copied!

There is some limited support for regular expressions within search queries, for fields like name, label and srcName you can use a subset of regular expressions to refine your search.

For example:

label:/(MF|IMG)/

matches labels containing the string MF or IMG.

You can even go as far as:

label:/.*_a(\.[a-zA-Z0-9]*)*/

which matches labels containing _a. followed by any alphanumeric combination.

Date time fields
Link copied!

Queries against date based fields must use the appropriate date formating. Queries for exact date values will require quoting or escaping since : is used to denote a field query. Date time field searches should all be range searches - from one date TO another - even if one of those values is a *. There are special keywords to enable simpler search definitions:

NOW - current time and date

HOUR, DAY, WEEK, MONTH, YEAR all define that period of time and can be preceded with a number (e.g. 3DAYS defines a period of 3 days)

HOUR, DAY, WEEK, MONTH and YEAR can also follow a datetime string(or NOW) like NOW/DAY to round the date time value to the nearest HOUR, DAY, WEEK, MONTH or YEAR.

Date time examples
Link copied!

created:[2020-01-01T23:59:59.999Z TO *]

created:[2020-01-01T23:59:59.999Z TO 2020-02-01T00:00:00Z]

lastSuccess.timestamp:[* TO NOW]

updated:[NOW-1YEAR/DAY TO NOW/DAY+1DAY]

In the image below we're using updated:[NOW - 1YEAR TO NOW + 1DAY] to search for images updated in the last year.

Searching for images updated in the last year

Boolean operators
Link copied!

AND, NOT and OR can all be used within search queries (AND is the same as &&, NOT ! and OR ||).

For example, following search query: "winter or signature*", returns assets that either have names or labels containing 'winter' or names containing any text starting with 'signature'. In this example we have chosen to display only images by clicking the image checkbox in the type section.

Using the asset search feature

Useful field names and their labels
Link copied!

Some further useful fields are shown in the table below. Note that detected objects and detected text are added to assets when you ingest images using our image recognition service.

Search labelDisplayed labelExampleNotes
lastSuccess.timestampLast Successful Publish DatelastSuccess.timestamp:[* TO NOW]
file.sizeFile Sizefile.size:[1000 TO 20000]file size is in bytes, and can be a range query so you can search for files between two values
detectedObjects.labelsDetected Objects, Faces, Unsafe ContentdetectedObjects.labels:manYou can also search in detectedObjects, detectedUnsafeContent and detectedFaces. Bear in mind these are exact matches rather than wildcarded or regex like name, srcName and label
detectedText.textLinesDetected TextdetectedText.textLines:SALEThese are exact matches rather than wildcarded or regex like name, srcName and label

Filtering
Link copied!

Using the filter tab within Content Hub gives you a much larger list of facets to filter by, including any custom meta data types that you may have set.

The filters are populated from the attributes of all the assets ingested into your account.

Choosing to filter assets by Mime type

Select the attribute you want to filter on and click the 'Add' button to add the filter. Then enter the value to search for. For example when filtering by Mime type you will be able to choose from all of the available Mime types from the all of the assets in your account.

Showing only images of the image/jpeg Mime type

Image recognition