Search facets search-facets
An enterprise-wide deployment of Adobe Experience Manager 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 Experience Manager.
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.
Add 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.
-
Click the Experience Manager logo, and then go to Tools > General > Search Forms.
-
From the Search Forms page, select Assets Admin Search Rail, then select Edit .
-
In the Edit Search Forms page, drag a predicate from the Select Predicate tab to the main pane. For example, drag Property Predicate.
Figure: Select and move a predicate to customize the search filters.
-
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.
Figure: Use the Settings tab to provide the required options of a predicate.
-
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.Figure: Associate a metadata property with a predicate in the Property Name field.
-
Click the Preview to generate a preview of the Filters panel as it appears after you add the predicate.
-
Review the layout of the predicate in the Preview mode.
Preview the search form before submitting the changes
-
To close the preview, click the Close on the upper-right corner of the preview.
-
Select Done to save the settings.
-
Navigate to the Search panel in the Assets user interface. The Property predicate is added to the panel.
-
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.
Add 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
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.
-
Select the Experience Manager logo, and then go to Tools > General > Search Forms.
-
From the Search Forms page, select Assets Admin Search Rail, then select the Edit icon.
-
In the Edit Search Form page, drag Options Predicate from the Select Predicate tab to the main pane.
-
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.
-
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.
- Select 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, select and repeat the step.
-
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
-
In the Description field, enter an optional description and then click Done.
-
Navigate to the Search panel. The Options predicate is added to the Search panel. The options for File Type are displayed as checkboxes.
Add 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 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.
- Click the Experience Manager logo, and then go to Tools > General > Search Forms.
- On the Search Forms page, select Assets Admin Search Rail, the select Edit .
- In the Edit Search Form page, drag a Multi Value Property Predicate from the Select Predicate tab to the main pane.
- 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. - 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.
- In the Description field, enter an optional description and then select Done.
- Navigate to the Filters panel in the Assets user interface. The Multi Value Property predicate is added to the panel.
- 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.
Add a Tags predicate adding-a-tags-predicate
The Tags
predicate lets you perform tag-based searches for assets. By default, 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.
-
Click the Experience Manager logo, and then go to Tools > General > Search Forms.
-
From the Search Forms page, select Assets Admin Search Rail and then select Edit .
-
In the Edit Search Form page, drag Tags Predicate from the Select Predicate tab to the main pane.
-
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. -
Configure the Root tags path property of this predicate to populate various tags in the Tags list.
-
Select Show match all tags option to search for assets that include all tags that you specify.
-
In the Description field, enter an optional description and then select Done.
-
Navigate to the Search panel. The Tags predicate is added to the Search panel.
-
Specify tags based on which you want to search assets or select from the list of suggestions.
-
Select Match all to search for matches that include all tags that you specify.
You can sort the tags structure in ascending or descending order based on the Name (alphabetical order), Created date, or Modified date. In the following Illustration, the tag structure is sorted alphabetically based on the Name.
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:
Remove default search facets removing-default-search-facets
Adobe recommends you to be careful while removing default search facets to avoid performance issues. Removing default search facets might also impact the default feature behavior.
Do not remove the following hidden fields as it causes a query performance issue with OmniSearch and smart collections:
-
group.2_group.type=dam:Asset
-
group.1_group.type=nt:folder
-
group.p.or=true
Restore 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.
To restore the default search facet, perform these steps:
-
Select Assets Admin Search Rail in the Search Forms page.
-
Select Delete in the toolbar.
-
In the confirmation dialog, select 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.
/apps
node in CRX./apps
node in CRX./var/dam/content
node in CRX. Also, Read and write permissions on /apps
node.See also