Skip to content

Keywords

Adding keywords to an asset

User keywords are words that can be used to search for an asset. The "user_keywords" column is a comma separated list.

let asset = call_tactic("get_by_code",
        { search_type: "workflow/asset", asset_code: asset_code } 
    )


let data = {
    user_keywords: "paris,night,bistro"
}

call_tactic("update",
        { search_key: assset, data=data } 

Note

The user_keyword columm is not the only keywords for an asset. An asset can acquire keywords in other ways:

  1. from the file name
  2. by being in a collectoin

Search by keywords

You can add a keyword style filter to any column, however, it is most commonly searched on by the "keywords" column. The "keywords" column is union of all the keywords from all of the sources of keywords for this asset (ie: collections, user_keywords, filename, etc)

let filters = [
    ['keywords', 'has', 'porsche']
]

let assets = call_tactic("query", {
          search_type: "workflow/asset",
          filters: filters
        })