You're viewing help content for version:

Use Search Facets to add search predicates to the Search panel in Adobe Experience Manager (AEM) Assets or modify existing search predicates. Search predicates lets you customize your search based and makes the search functionality versatile.

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

Adding a Predicate

  1. Click the AEM logo, and then go to ToolsGeneral > Search Forms.

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

  3. In the Edit Search Forms page, drag a predicate from the Select Predicate tab to the main pane. For example, drag Property Predicate.

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

    Note:

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

  5. In the Property Name field, enter a name for the property based on which the search is performed. For example, enter jcr:content/metadata/dc:description or ./jcr:content/metadata/dc:description.

    Note:

    Ensure that the Property Name field and other required fields are not empty and that they contain valid values. You cannot submit the Search form without specifying valid values for required fields.

  6. Click the Preview icon to generate a preview of the Search panel as it appears after you add the predicate.

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

  8. To close the preview, click the Close icon on the top-right corner of the preview.

  9. Click 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

The Options predicate is the most versatile of predicates. It lets you configure multiple search options in the Search panel. 

Once configured, you can select one or more of these options in the Search panel to search for assets based on them. For example, to provide the ability to search for assets based on file type in the Search panel, 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 Search 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 path 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 Search 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.

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 JSON Path field. For example, you can define the key-value pairs, image/bmpimage/gifimage/jpeg, and image/png and specify their values as shown in the following sample JSON file.  In the JSON Path 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"}
 ]

}		

Note:

The Options predicate is a custom wrapper that comprises property predicates to demonstrate the described behavior. Currently, there is no REST endpoint available to support the functionality natively.

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

     

     

     

  2. From the Search Forms page, select Assets Admin Search Rail and then click 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.

    Caution:

    Both step 5 (Configuring the JSON path) and step 6 (Configuring the Options path) describe alternative ways to configure options for the Options predicate. Therefore, perform either step 5 of step 6 (not both simultaneously) and then proceed with the subsequent steps in this procedure.

  5. In the JSON Path field, mention the path of the JSON file where you define the nodes for the options and specify corresponding key-value pairs.

  6. Click the Browse icon beside the Option Path field to specify the complete path for the options you want to supply in the Select Path page. Click Confirm to confirm your selection.

    To add another option path, click the Add icon and repeat the procedure.

  7. 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 only select a single option for file types at a time.

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

  9. 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

The Multi Value Property predicate lets you search assets for multiple values. Consider a scenario where you have images of multiple products in AEM 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 AEM logo, and then go to Tools > General > Search Forms.

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

  3. In the Edit Search Form page, drag 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.

  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 click/tap Done.

  7. Navigate to the Search 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 Tag predicate

The Tag predicate lets you to perform tag-based searches for assets. By default, AEM Assets searches assets for one or more tag 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 AEM logo, and then go to Tools > General > Search Forms.

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

  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.

  5. Configure the Options 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.

  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.

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

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 asssets 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

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.

To restore the default search facets:

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

  2. Click the Delete icon on the toolbar. 

  3. In the Delete search customizations dialog, click 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

The following table lists the permissions you require to perform edit, delete, and preview actions involving search facets if you are not assigned an administrator role.

Action Permissions
Edit  Read and Write permissions on the /apps node in CRX
Delete Read, Write, Delete and  permissions on the /apps node in CRX
Preview Read, Write, Delete and  permissions on the /var/dam/content node in CRX. Also, Read and Write permissions on /apps

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy