Search facets search-facets

CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.

Learn how to create, modify, and use search facets in AEM.

An enterprise-wide deployment of Adobe Experience Manager (AEM) Assets has the capacity to store many assets. Sometimes, finding the right asset can be arduous and time-consuming if you only use the generic search capabilities of AEM.

Use search facets in the Filters panel to add more granularity to your search experience and make the search functionality more efficient and versatile. Search facets add multiple dimensions (predicates) that enable you to perform more intricate searches. The Filters panel includes a few standard facets. You can also add custom search facets.

In summary, search facets let you search for assets in multiple ways rather than in a single, pre-determined, taxonomic order. You can easily drill down to the desired level of detail for a more focused search.

For example, if you are looking for an image, you can choose whether you want a bitmap or a vector image. You can reduce the scope of search further by specifying the MIME type for the image. Similarly, when searching for documents, you can specify the format, for example PDF or MS Word.

Adding a Predicate adding-a-predicate

The search facets that appear in the Filters panel are defined in the underlying search form using predicates. To display more or different facets, you add predicates to the default form or use a custom form that includes facets of your choice.

For full-text searches, add the Fulltext predicate to the form. Use the Property predicate to search for assets that match a single property you specify. Use the Options predicate to search assets that match one or more values for a particular property. Add the Date Range predicate to search assets created within a specified date range.

  1. Tap/click the Experience Manager logo, and then go to Tools > General > Search Forms.

  2. From the Search Forms page, select Assets Admin Search Rail, then tap Edit aemassets_edit .

    Locate and select the Assets Admin Search Rail

    Locate and select the Assets Admin Search Rail

    note note
    NOTE
    To use the folder search functionality from the pre-configured Assets Admin Search Rail from an earlier Experience Manager version, perform these steps:
    1. Navigate to /conf/global/settings/dam/search/facets/assets/jcr:content/items in CRX-DE.
    2. Delete the type node.
    3. From the path /libs/settings/dam/search/facets/assets/jcr:content/items, copy the nodes asset, directory, typeor, excludepaths, and searchtype to the path mentioned on step 1.
    4. Save the changes.
  3. In the Edit Search Forms page, drag a predicate from the Select Predicate tab to the main pane. For example, drag Property Predicate.

    Drag-and-drop a predicate to customize the search filters

    Drag-and-drop a predicate to customize the search filters

  4. In the Settings tab, enter a field label, placeholder text, and description for the predicate. Specify a valid name for the metadata property you want to associate with the predicate.

    The header label in the Settings tab identifies the type of the selected predicate.

    Use the Settings tab to provide the required options of a predicate

    Use the Settings tab to provide the required options of a predicate

  5. In the Property Name field, specify a valid name for the metadata property you want to associate with the predicate. It is the name based on which the search is performed. For example, enter jcr:content/metadata/dc:description or ./jcr:content/metadata/dc:description.

    You can also select an existing node from the selection dialog.

    Associate a metadata property with a predicate in the Property Name field

    Associate a metadata property with a predicate in the Property Name field

  6. Tap/click the Preview preview to generate a preview of the Filters panel as it appears after you add the predicate.

  7. Review the layout of the predicate in the Preview mode.

    Preview the search form before submitting the changes

    Preview the search form before submitting the changes

  8. To close the preview, tap/click the Close close on the upper-right corner of the preview.

  9. Tap Done to save the settings.

  10. Navigate to the Search panel in the Assets user interface. The Property predicate is added to the panel.

  11. Enter a description for the asset to be searched in the text box. For example, enter “Adobe.” When you perform a search, assets with description matching “Adobe” are listed in the search results.

Adding an Options predicate adding-an-options-predicate

The Options predicate lets you add multiple search options in the Filters panel. You can select one or more of these options in the Filters panel to search for assets. For example, to search for assets based on file type, configure options, such as Images, Multimedia, Documents, and Archives in the search form. After you configure these options, the search is performed on assets of type GIF, JPEG, PNG, and so on, when you select the Images option in the Filters panel.

To map the options to the respective property, create a node structure for the options and provide the path of the parent node in the Property Name property of Options predicate. The parent node should be of type sling: OrderedFolder. The options should be of type nt:unstructured. The option nodes should have the properties jcr:title and value configured.

The jcr:title property is a user-friendly name for the option that is displayed on the Filters panel. The value field is used in the query to match the specified property.

When you select an option, the search is performed based on the value property of the option node and its child nodes, if any. The entire tree under the option node is traversed and the value property of each child node is combined using an OR operation to form the search query.

For example, if you select “Images” for file types, the search query for the assets is built by combining the value property using an OR operation. For example, the search query for images is built by combining the results matched for image/jpeg, image/gif, image/png, image/pjpeg, and image/tiff for the property jcr:content/metadata/dc:format using an OR operation.

Value property of a file type, as seen in CRXDE, is used for search queries to work

Value property of a file type, as seen in CRXDE, is used for search queries to work

Instead of manually creating a node structure for the options in the CRX repository, you can define the options in a JSON file by specifying corresponding key-value pairs. Specify the path of the JSON file in the Property Name field. For example, you can define the key-value pairs, image/bmp, image/gif, image/jpeg, and image/png and specify their values as shown in the following sample JSON file. In the Property Name field, you can specify the CRX path for this file.

{
    "options" :
 [
          {"value" : "image/bmp","text" : "BMP"},
          {"value" : "image/gif","text" : "GIF"},
          {"value" : "image/jpeg","text" : "JPEG"},
          {"value" : "image/png","text" : "PNG"}
 ]
}

If you want to use an existing node, specify it using the selection dialog.

NOTE
The Options predicate is a custom wrapper that includes property predicates to demonstrate the described behavior. Currently, there is no REST endpoint available to support the functionality natively.
  1. Tap the Experience Manager logo, and then go to Tools > General > Search Forms.

  2. From the Search Forms page, select Assets Admin Search Rail, then tap the Edit icon.

  3. In the Edit Search Form page, drag Options Predicate from the Select Predicate tab to the main pane.

  4. In the Settings tab, enter a label and a name for the property. For example, to search assets based on their format, specify a user-friendly name for the label, for example File Type. Specify the property based on which the search is to be performed in the property field, for example jcr:content/metadata/dc:format.

  5. Do one of the following:

    • In the Property Name field, mention the path of the JSON file where you define the nodes for the options and specify corresponding key-value pairs.
    • Tap Add icon next to the Options field to specify the display text and value for the options you want to supply in the Filters panel. To add another option, tap/click Add icon and repeat the step.
  6. Ensure that Single Select is cleared to let the user select multiple options for file types at a time (for example, Images, Documents, Multimedia, and Archives). If you select Single Select, the user can select only one option for file types at a time.

    The available fields in the Options predicate

    The available fields in the Options predicate

  7. In the Description field, enter an optional description and then click Done.

  8. Navigate to the Search panel. The Options predicate is added to the Search panel. The options for File Type are displayed as checkboxes.

Adding a Multi Value Property predicate adding-a-multi-value-property-predicate

The Multi Value Property predicate lets you search assets for multiple values. Consider a scenario where you have images of multiple products in Experience Manager Assets and the metadata for each image includes an SKU number associated with the product. You can use this predicate to search for product images based on multiple SKU numbers.

  1. Click the Experience Manager logo, and then go to Tools > General > Search Forms.
  2. On the Search Forms page, select Assets Admin Search Rail, the tap Edit aemassets_edit .
  3. In the Edit Search Form page, drag a Multi Value Property Predicate from the Select Predicate tab to the main pane.
  4. In the Settings tab, enter a label and placeholder text for the predicate. Specify the property name based on which the search is to be performed in the property field, for example jcr:content/metadata/dc:value. You can also use the selection dialog to select a node.
  5. Ensure that Delimiter Support is selected. In the Input Delimiters field, specify delimiters to separate individual values. By default, comma is specified as the delimiter. You can specify a different delimiter.
  6. In the Description field, enter an optional description and then tap Done.
  7. Navigate to the Filters panel in the Assets user interface. The Multi Value Property predicate is added to the panel.
  8. Specify multiple value in the Multi Value field separated by the delimiters and perform the search. The predicate fetches an exact text match for the values you specify.

Adding a Tags predicate adding-a-tags-predicate

The Tag predicate allows you to perform tag-based searches for assets. By default, Experience Manager Assets searches assets for one or more tags matches based on the tags you specify. In other words, the search query performs an OR operation using the specified tags. However, you can use the match all tags option to search for assets that include all tags that you specify.

  1. Click the Experience Manager logo, and then go to Tools > General > Search Forms.

  2. From the Search Forms page, select Assets Admin Search Rail and then tap Edit aemassets_edit .

  3. In the Edit Search Form page, drag Tags Predicate from the Select Predicate tab to the main pane.

  4. In the Settings tab, enter a placeholder text for the predicate. Specify the property name based on which the search is to be performed in the property field, for example jcr:content/metadata/cq:tags. Alternatively, you can select a node in CRXDE from the selection dialog.

  5. Configure the Root tags path property of this predicate to populate various tags in the Tags list.

  6. Select Show match all tags option to search for assets that include all tags that you specify.

    Typical settings of Tags predicate

    Typical settings of Tags predicate

  7. In the Description field, enter an optional description and then click/tap Done.

  8. Navigate to the Search panel. The Tags predicate is added to the Search panel.

  9. Specify tags based on which you want to search assets or select from the list of suggestions.

    AEM-provided suggestion when typing name of tag

    AEM-provided suggestion when typing name of tag

  10. Select Match all to search for matches that include all tags that you specify.

Adding other predicates adding-other-predicates

Similar to the way you add a Property predicate or an Options predicate, you can add the following additional predicates to the Search panel:

Predicate Name
Description
Properties
Fulltext
Search predicate to perform full text search on an entire asset node. It is mapped with the jcr:contains operator. You can specify a relative path if you want to perform a full text search on a specific part of the asset node.
  • Label
  • Placeholder
  • Property name
  • Description
Path Browser
Search predicate to search for assets in folders and subfolders at a preconfigured root path
  • Placeholder
  • Root path
  • Description
Path
Use it to filter results on location. You can specify different paths as options.
  • Label
  • Path
  • Description
Publish Status
Search predicate to search assets based on their publish status
  • Label
  • Property name
  • Description
Relative Date
Search predicate to search assets based on the relative date of their creation. For example, you can configure options, such as 2 months ago, 3 weeks ago, and so on.
  • Label
  • Property name
  • Relative date
Range
Search predicate to search assets that lie within a specified range. In the Search panel, you can specify minimum and maximum values for the range.
  • Label
  • Property name
  • Description
Date Range
Search predicate to search assets created within a specified range for a date property. In the Search panel, you can specify Start and End dates using date pickers.
  • Label
  • Placeholder
  • Property name
  • Range text (From)
  • Range text (To)
  • Description
Date
Search predicate for a slider-based search of assets based on a date property.
  • Label
  • Property name
  • Description
File Size
Search predicate to search assets based on their size. It is a silder-based predicate where you select the slider options from a configurable node. The default options are defined at /libs/dam/options/predicates/filesize in the CRX repository. File size is provided in bytes.
  • Label
  • Property name
  • Path
  • Description
Asset Last Modified
Search predicate to search recently modified assets
  • Property name
  • Property value
  • Description
Publish Status
Search predicate to search for assets based on their publish status
  • Label
  • Property name
  • Description
Rating
Search predicate to search assets based on their average rating
  • Label
  • Property name
  • Option path
  • Description
Expiry Status
Search predicate to search for assets based on their expiration status
  • Label
  • Property name
  • Description
Hidden
Search predicate that defines a hidden field property to search for assets
  • Property name
  • Property value
  • Description

Restoring default search facets restoring-default-search-facets

By default, a Lock icon appears before Assets Admin Search Rail in the Search Forms page. The Lock icon disappears if you add search facets to the form indicating that the default form has been modified.

Lock icon against an option on the Search Forms page indicate that the default settings are intact and are not customized.

Lock icon against an option on the Search Forms page indicate that the default settings are intact and are not customized.

To restore the default search facet, perform these steps:

  1. Select Assets Admin Search Rail in the Search Forms page.

  2. Tap Delete deleteoutline in the toolbar.

  3. In the confirmation dialog, tap Delete to remove the custom changes.

    After you delete the custom changes to search facets, the Lock icon reappears before Assets Admin Search Rail in the Search Forms page.

User permissions user-permissions

If you are not assigned an administrator role, here is a list of permissions you require to perform edit, delete, and preview actions involving search facets.

Action
Permissions
Edit
Read and Write permissions on the /apps node in CRX
Delete
Read, Write, and Delete permissions on the /apps node in CRX
Preview
Read, Write, and Delete permissions on the /var/dam/content node in CRX. Also, Read and Write permissions on /apps node.
recommendation-more-help
4452738f-2bdf-4cd4-9b45-905a69d607ad