Skip to content
  • There are no suggestions because the search field is empty.

Understanding Imagen Query Language πŸ‘¨β€πŸ«

Imagen Query Language is a search feature that uses a variety of parameters to narrow down results.

Overview


How a query is constructed

WHERE is the foundation of any query as it will establish the conditions of your query. You can then use the following code to refine the parameters of your search:


media.State = 'Archived' / 'Failed'

Where

β€˜Archived’ identifies records that have media files stored against them

'Failed' indicates that a problem has taken place during ingestion - troubleshooting guide


AND identifies an additional parameter


media.ParentID = null } identifies records that are not segments or children created from other records


ORDER BY indicates an order by which to display results:

Where

DESC for descending order, with the highest value first

ASC for ascending order, with the lowest value first


Date is the field by which the results will be ordered


LIMIT {n} establishes the total number of items to load, where n is the number


Example syntax

  • WHERE Field = 'value'
  • WHERE Field = 'value' LIMIT 100
    • Updating the Limit of results will increase or decrease the number of media items shown across widget pages
  • WHERE Field = 'value' ORDER BY Date ASCΒ 
    • Changing the ORDER BY from DESC to ASC will instead sort by the smallest value first
  • WHERE Field = 'value' ORDER BY Field
    • Changing the field used to ORDER BY to a text field will order AlphanumericallyΒ 

⚑Pro tip: You can order your results by media.archivedTime instead. This will return the media most recently stored. This may help if you use your system to host multiple media files per record and routinely add content to pre-existing records.


ADDITIONAL METADATA PARAMETERS

Building Metadata Parameters


The Imagen Query Language is scalable so you can easily add additional parameters to selectively display specific cross-sections of your media. The added parameters will query your media’s metadata to identify it, so it is important to know your metadata field names and associated values.

Metadata field names are not necessarily the display names visible in records. Metadata field names will not display spaces or punctuation, sometimes these are swapped for underscores. Always use proper metadata field names in your queries. β€˜value’ refers to the metadata within that field.
Can't see the guide below? Open it in a new tab ↗ (may not work when viewing this page in SharePoint)
If SharePoint blocks the link, copy this address and paste it into a new browser tab:
https://scribehow.com/embed/Find_actual_field_names__eJeGEcVERh6PG_g52WE1pw?as=scrollable&removeLogo=true

Example syntax

Field_Name = β€˜value’ will return results matching that criteria, e.g.Β 

Colour = β€˜blue’ 

This will return a match if you have a metadata field called 'Colour' and media with the value of 'blue' in your system.

Free Text Fields

When querying a free-type text field (Title field or a Description/Summary, as an example), you can specify multiple separate keywords (with commas) to search for or specify an exact sequence of those words to display.

⚠️Warning: Imagen query language uses single and double quotes to specify a partial or an exact match:

Exact match
This query will only return results where both words exist within that field,Β  As an example, Title = β€œrock candy” will only show the results where both words are specified in that order, with no words in between, so only β€œRock Candy sales Soar” will not be returned

Field_Name = β€˜value1’ 

Partial Match

The following query will return results where both words feature in the title, regardless of their order, including results like β€˜Rock Candy Sales Soar’ and β€˜Boy loses Candy at Rock Concert’

Field_Name = β€œvalue1 value2”

Β 

Conditional Operators

Instead of using the equals = operator conditions using the following parameters instead of the straight equals (=) operation. These include:

-> Returns numerical values or dates that are greater than the specified condition

{some_field} -> {Value}

-< Returns numerical values or dates that are less than the specified condition

{some_field} < {Value}

!= excludes the metadata value you are specifying. For example, where something is not equal to.Β 

!={some_field} != {Value}

Adding your Metadata Parameter to your query statement

To add the Metadata Parameter to your Imagen Query Language statement, you will need to use the following structure:

 AND Field_Name = β€˜value’

The additional metadata parameter must be included between the media.ParentID and the ORDER BY parts of your query (as per the below). Including them, anywhere else may return different results (as your added parameter may not be considered in your query).

WHERE media.State = 'Archived' AND media.ParentID = null AND Field_Name = β€˜value’ ORDER BY Date DESC LIMIT 4

You may add multiple Metadata Parameters to further drill down your content

⚑ Pro tip: An additional operator is available, to include a wider range of content, in the shape of OR. This allows you to showcase a wider collection of content based on metadata, as it will display results where one condition is true OR the other is true. OR statements should be held within brackets and preceded by an AND, as you will find different results if brackets are not included. This means the structure to follow is:

AND (Field_Name = β€˜Value1’ OR Field_Name = β€˜Value2’) ; 

this will return results where those two conditions are true (can be used for different fields for different cross sections or the same field for multiple values of that field, e.g. a multi select dropdown).


Additional considerations for related records imagen query language statements

For Related Records, the notion of a token, or variable value is introduced. This understands the value of the field from the current page you are visiting and applies it to your search. A token is expressed by surrounding the Field_Name with % either side instead of a value, give the following style of structure:

WHERE Field_Name = %Field_Name%

When configuring a Related Record query, you can use static values, though these will be the same across all your records pages. This is why you would rather want a formula such as

WHERE Colour = %Colour% 

to display all records which are the same colour as the one you are

viewing, rather than

WHERE Colour = β€˜Blue’ 

which would only ever display Blue records regardless of the record you are currently viewing, making them less β€˜related’ . You can amend the wording of Related Media in some themes to support this change in purpose.

Β 


Querying dates in Imagen query language

If you wish to present a cross-section based on dates (e.g. a β€˜This day in history’ style of feature), Imagen Query Language supports:

  • DATE(
  • DAYOFYEAR(
  • DAYOFMONTH(
  • DAYOFWEEK(

  • NOW(

This allows you to build statements which only interpret certain aspects of the date stored against your media, and should be used in the following format: DATE(Field_Name) = DATE(NOW())

The NOW() operator acts as a variable which prints the current date & time. To present all records marked as this calendar date, you would need to use the following format: DAYOFYEAR(fieldClass.Date) = DAYOFYEAR(NOW())

Β 

Accessibility πŸ‘Welcome to Imagen!Automated transcription (Speech-to-Text) πŸ‘¨β€πŸŽ“Welcome to Imagen!Developers' Guide πŸ“• πŸ”’Welcome to Imagen!How We Can Help You Onboard Your Content πŸ“•Welcome to Imagen!Introduction to Imagen πŸ“•Welcome to Imagen!Onboarding Guide πŸ“•Welcome to Imagen!The Imagen Transcoder Farm πŸ“•Welcome to Imagen!The Imagen Video Player πŸ“•Welcome to Imagen!Storage Availability πŸ€”Welcome to Imagen!Storage Options πŸ€”Welcome to Imagen!Storage Security πŸ€”Welcome to Imagen!Which Theme Is Right for Me πŸ€”Welcome to Imagen!Why Is User Experience So Important? πŸ€”Welcome to Imagen!Imagen Term Glossary πŸ“°Welcome to Imagen!Supported Browsers πŸ“°Welcome to Imagen!Video Player Keyboard Shortcuts πŸ“°Welcome to Imagen!What is a Media Object Timeline πŸ‘©β€πŸŽ“Welcome to Imagen!Newbie Checklist πŸ‘‹Welcome to Imagen!Activity History ⚑FindGoogle Analytics πŸ‘©β€πŸŽ“FindAdding Annotations to Your Video Content ⚑FindAnnotation Layers πŸ“•FindAnnotations GuideπŸ“•FindExporting Annotations ⚑FindGenerate Subtitles for Audio Content ⚑FindGenerate subtitles for video content ⚑FindGrouping Annotations on Export ⚑FindImagen Subtitle Guide πŸ“•FindReordering Objects Within a Collection πŸ“•FindCustom ReportingFindHow can I see the Open-Source Programming Languages used by Imagen? πŸ€”FindIf I search on the homepage, I get one type of search URL. But I get a different kind of URL on the "Search Results Page" πŸ€”FindMy search results seem out of date ⚠️FindWhat metadata does Imagen extract from my video content? πŸ€”FindImagen Query Language - Media Viewer Widget ⚑FindImagen Query Language Reference πŸ“°FindUnderstanding Imagen Query Language πŸ‘¨β€πŸ«FindArtificial Intelligence ServicesFindDescriptive Metadata Fields πŸ“•FindExtracting Image Metadata on Import ⚑FindField Types and Record SchemaΒ πŸ“•FindImagen Query Language - Related Records View ⚑FindImagen Query Language Guide πŸ“•FindImagen XML Schema Mapping (XSLT) πŸ“•FindSingle/multi-select fields - remote validationFindActivate a Language license ⚑FindChange My Default Language ⚑FindDisplay Multilanguage Annotations ⚑FindHow to configure multilanguage logos ⚑Findlanguage packs πŸ“•FindCreating Parent/Child Field DependenciesFindDeleting RecordsFindRecords & Media Objects πŸ“•FindUpdating Records ⚑FindAdd Fields to the Search Index ⚑FindAdding a filter to the search page ⚑FindAdvanced Search Reference πŸ“°FindSaved Searches πŸ“•FindSearch Index Guide πŸ“•FindUpdating the Imagen Search Index ⚑FindBespoke Ingestion πŸ“•StoreWhat is a 'Watchfolder'? πŸ“•StoreImport from Dropbox ⚑StoreImport from OneDrive ⚑StoreUsing the Record (XML) Import Widget ⚑StoreCan non-media file types still be uploaded to Imagen?πŸ€”StoreCreate a record with media ⚑StoreCreate an empty record with metadata ⚑StoreCreate Imagen XML in Excel πŸ‘©β€πŸŽ“StoreCreateΒ multiple records, each with a single piece of media ⚑StoreImagen Media Workflows πŸ“•StoreImport Media from a URL ⚑StoreMedia Import and Ingestion πŸ“•StoreOptions for Onboarding your Metadata and Media πŸ€”StorePFR (Partial File Restore) and Segments πŸ“•StoreWhat information do you store about my video during ingest? πŸ€”StoreBurnt-in Timecodes (BITC) πŸ“•StoreThe Imagen Image Editor ⚑StoreWatermarking ⚑Store.PDF ViewerStoreAdd a Document Viewer ⚑StoreConfiguring Amazon S3 Intelligent-TieringStoreStorage Costs πŸ“•StoreStorage Profile Reference πŸ“„StoreStorage Replication 🌐StoreSupported File Types πŸ“°StoreConfiguring Amazon S3 Storage TutorialStoreConfiguring Wasabi Storage TutorialStoreStorage LocationsStoreWhy Has My Media Failed to Ingest to Wasabi? πŸ€”StoreConfiguring "Download Profiles" ⚑DistributeInstalling and Using Imagen Accelerated File Delivery (AFD) ⚑DistributeOrdering Clips on Behalf of Other Users πŸ“•DistributeEdit Live Stream Notification Emails ⚑DistributeImagen Live Connect API πŸ“°DistributeAd-hoc PaymentsDistributeIntroduction to Content Licensing πŸ“•DistributePrep: Imagen License and Stripe Accounts ⚑DistributeShopping Basket ConfigurationπŸ“„DistributeShopping BasketsΒ πŸ“•DistributeSubscription Configuration ⚑DistributeSubscription Overview πŸ“•DistributePOST /iweb/v1/notification πŸ“°DistributeAnonymous Sharing Links to Collections (Septeber Release)DistributeCollections πŸ“•DistributeEmbedding Media on External SitesDistributeShare media with unregistered usersDistributeSocial Media PublishingDistributeSunrise/Sunset Dates for Open Access Links ⚑DistributeCreate an MRSS Feed ⚑DistributeImagen Live Connect πŸ“•DistributeImagen MRSS Feed Response πŸ“°DistributeOver the top (OTT) Delivery πŸ“•DistributeBatch Editing Record & Media ACLManageCustom ACLsManageSet When Your Users Can Access Your Content ⚑ManageSetting Default Access Control Lists (ACL) for Records, Media, and Collections ⚑ManageSetting Record & Media Access Control Lists (ACL)ManageWhat are "ACLs"? πŸ€”ManageChanging Your Theme ⚑ManageDisplay banners on your site πŸ‘©β€πŸŽ“ManageI want to add a theme, which is right for me πŸ€”ManagePreview a theme before you commit ⚑ManageAdding Users to Groups ⚑ManageSet Permissions for a Group of Users ⚑ManageDynamic form ⚑ManageImagen Query Language - The Carousel Widget ⚑ManageMap Viewer Widget ⚑ManageWidgets πŸ“•ManageAdobe Premiere Pro IntegrationManageCache Page πŸ“„ManageCookies Page πŸ“°ManageDisplay Fields πŸ“„ManageEmail πŸ“„ManageEnvironment PageπŸ“°ManageFederations πŸ“°ManageGeolocation database πŸ“°ManageGlobal Settings Page πŸ“„ManageHealth Check Page πŸ“°ManageMailing List πŸ“„ManageMaintenance Mode πŸ“„ManageThe Imagen Admin Interface Directory πŸ“‹ (Private)ManageUpdate Page πŸ“°ManageUser Intelligence πŸ“•ManageCreate an OrganisationManageAdding users to user groups through organisations ⚑ManageConfiguring Federated SSO ⚑ManageConfiguring your SSO service provider ⚑ManageGuide to SSO πŸ‘©β€πŸ«ManageI'm being sent back to ImagenWeb from the IDP but I can't get any further πŸ€”ManageCustom Cookie Policy (Javascript) TutorialManageImagen Event ServiceManageBanning a User from Site Access ⚑ManageClear Users That Have Not Been ValidatedManageCreate a Custom Registration ProcessManageCreating Custom Registration FieldsManageCreating request/approval relationships ⚑ManageCustomizing your Login Page ⚑ManageGrant a User Administrator PermissionsManageGrant a User Developer PermissionsManageGranting Site Permissions to an Individual User ⚑ManageGuide to Building Access Control πŸ“•ManageIntroduction to Users, Groups, and Organisations πŸ“•ManageManage Permissions with Imagen πŸ“•ManagePreview Only AccessManageRestrict user sign-ups by geographyManageSetting User Signup RulesManageUser Permissions πŸ“°ManageHow do I add reCAPTCHA to my Imagen siteManageCore REST Interface πŸ“°DevelopersGET /api/v1/endpoints πŸ“°DevelopersGet /core/v1/application πŸ“°DevelopersGET /imcc/v1/job/list πŸ“°DevelopersGET /licenceStatus/πŸ“° WIPDevelopersGET /user/ πŸ“°DevelopersGET history πŸ“°DevelopersGET imcc/v1/job/count πŸ“°DevelopersGET job/searchπŸ“°DevelopersGET rights πŸ“°DevelopersPut /imcc/v1/job πŸ“°DevelopersAuthentication via Signed StringπŸ“°DevelopersHow to authenticate API calls with a Bearer token πŸ“°DevelopersCreating an Application in Imagen ⚑DevelopersGaining a Bearer Token ⚑DevelopersGET /iweb/v1/search πŸ“°DevelopersImagen API Documentation πŸ“• πŸ”’DevelopersGET /iweb/v1/notifications πŸ“°DevelopersGET Profiles πŸ“°DevelopersExample MRSS Reader (Powershell) πŸ“„DevelopersImagen XML Reference πŸ“°DevelopersNew metadata-only record with no media πŸ“°DevelopersNew record with a single piece of media πŸ“°DevelopersNew record with multiple pieces of mediaπŸ“°DevelopersRecord update adding new mediaπŸ“°DevelopersRecord update with metadata only πŸ“°DevelopersSet ACL by XML πŸ“°DevelopersGET /import/record πŸ“°DevelopersGET /iweb/v1/download πŸ“°DevelopersPUT /import/record/ πŸ“°DevelopersCreating a Video Record with the Imagen API πŸ‘©β€πŸ«DevelopersFind the UMID of a media file πŸ‘©β€πŸ«DevelopersHow to find an Import Record (job) GUID πŸ‘©β€πŸ«DevelopersHow to find your Media Control Centre FQDN ⚑ πŸ”’DevelopersHow to find your media ID πŸ‘©β€πŸ«DevelopersHow to Find Your Resource Group Name πŸ‘©β€πŸ«DevelopersProgrammatic API Call Examples πŸ“°DevelopersScopes πŸ“°DevelopersStandard Failure Response πŸ“°DevelopersWhat is a job priority? πŸ‘©β€πŸ«DevelopersDELETE /import/record/ πŸ“°DevelopersDELETE /media πŸ“°DevelopersGET /iweb/v1/users πŸ“°DevelopersWebhooksDevelopersXML Watch Folder Tutorial (Lambda) πŸ”’Partners & InternalDELETE /imcc/v1/media/ πŸ“° πŸ”’Partners & InternalDELETE /imcc/v1/record/ πŸ“° πŸ”’Partners & InternalDELETE imcc/v1/import/record/ πŸ“° πŸ”’Partners & InternalGET imcc/v1/import/record/ πŸ“° πŸ”’Partners & InternalGET imcc/v1/record/search πŸ“° πŸ”’Partners & InternalGET record/validateSearch πŸ“° πŸ”’Partners & InternalPUT imcc/v1/import/record/ πŸ“° πŸ”’Partners & InternalAdd a Video Player ⚑ πŸ”’Partners & InternalAdd an Audio Player ⚑ πŸ”’Partners & InternalAdd an Image Viewer ⚑ πŸ”’Partners & InternalMake a clip from a live feed in progress ⚑ πŸ”’Partners & InternalImagen Deployment Tutorial πŸ”’Partners & InternalWatchfolder Tutorial (Azure Function Media Uploaded Trigger) πŸ”’Partners & InternalWatchfolder Tutorial (Azure Function XML Uploaded Trigger) πŸ”’Partners & InternalOnboarding Playbook πŸ”’Partners & InternalJob and File Status Codes πŸ“„ πŸ”’Partners & InternalAdd a subtitles workflow to Imagen ⚑ πŸ”’Partners & InternalCreate a New Empty Workflow ⚑ πŸ”’Partners & InternalRest Plugin Setup for Vantage Integration πŸ‘©β€πŸ”¬ πŸ”’Partners & InternalWatch Folder With FTPS Tutorial πŸ‘¨β€πŸ« πŸ”’Partners & InternalXML Watch Folder Tutorial (Windows) πŸ”’Partners & Internal