Assets admin search rail

The Assets admin search rail allows assets to be searched for using custom criteria in Omnisearch.

Transcript
The asset set in Search Rail defines the sidebar, which exposes search filters for assets in OmniSearch. While AEM provides an out of the box Search Rail configuration for AEM assets. This typically requires adjusting whenever custom metadata is in play to ensure AEM users can quickly and easily find assets. The Asset Search Rail can be configured by AEM asset administrators at Tools, General, Search Forms, Assets Admin Search Rail.
The lock indicates the default search form is being used, once it’s edited the lock disappears. Now, the Olive OmniSearch rails are centrally managed shares. So, make sure you pick the correct one. Let’s go ahead and open it to edit. So, select it and tap edit.
The left panel is a visual model of the search form and the right panel contains the search filter inputs that can be added. When configuring the search form remember it’s global across AEM assets. So, if multiple groups are managing different sets of assets, make sure these configurations make sense for everyone. Before we jump into modifying the search form, it’s crucial to understand the search form under the covers, constructs, and AEM QueryBuilder HTTP query. If you’re not familiar with AEM’s QueryBuilder, it’s an AEM specific syntax that’s used to construct often complex queries for AEM. Without getting in too deep, QueryBuilder queries are comprised of lists of key-value pairs. The keys define the QueryBuilder predicate and the values, the configuration, or the parametrization of the predicate. Predicate simply define parts of a query that performs some filtering operation and AEM provides many different predicates for QueryBuilder. Just to list a few to give you a sense of what they do, the type predicate known as the query to specific note types, the path predicate known as the query to specific content paths in AEM and the property predicate restricts results by JCR property and value. So, the search fields, or as they’re called search predicates, simply map to QueryBuilder predicates or specific configurations of QueryBuilder predicates.
Each search predicate added to the form will have its criteria added together. Let’s adjust the search form to our liking but before we do that, let’s remind ourselves what it looks like. To do this, we can click the handy preview button that will render the current state of the search form.
Okay, let’s close the preview and make some changes to the form. We’ll remove the asset insights as we don’t have that set up just yet.
Let’s remove the style field that lets us filter on out of the box style tags and let’s edit the existing orientation field and change it to filter by our custom activity tag. Let’s change the field label to activity, update the placeholder.
The property name is the same since AEM tags are typically stored in the metadata node, cq:tags/property, but let’s select our Activity tag route to drive the allowed tags and let’s move the file size and type down to the bottom of the form by dragging and dropping them.
Now, let’s set a brand new search predicate, for this we’ll add a relative date range that helps our AEM users locate assets whose off time is getting close. We’ll add a date range predicate, set the label to off time and add a helpful placeholder.
We’ll point at the property relative to the dam asset resource, so, JCR colon content slash off time and update the labels for the two ends of the range. And we’re done editing this field. Before we finish with the form, let’s talk about these last few nondescript fields at the bottom. These are hidden predicates that are baked into the form for any and every search enforces a baseline of filter criteria. For example, AEM provides hidden predicates that together restrict search results to either dam assets or empty folder resources. The syntax for defining these are simply the QueryBuilder predicate key and value pairs as discussed before.
The property name contains the QueryBuilder predicate and the property value, whatever value is to be set. The property values can be any valid QueryBuilder predicate including group qualifications. Since each in predicate only allows one key-value pairing, multiple hidden predicates can be added to the form and associated with each other using QueryBuilder’s group syntax.
Before saving, we can preview our changes and give it a quick once over since upon save these changes will immediately become available to all AEM users.
Okay, everything looks good, let’s save it. Now, we can head over to AEM Assets OmniSearch, open the left sidebar, and there we have it, a fully customized AEM Search Rail. -
recommendation-more-help
a483189e-e5e6-49b5-a6dd-9c16d9dc0519