Custom Search Facets in AEM Assets

Published
Search Facet allow authors to filter assets based on metadata. While AEM provides default search facets out-of-the-box (like file type, file size, status), many organizations have unique metadata requirements. That's where custom search facets come in — they let you tailor the search experience to better suit your organization's specific asset metadata and workflows.
Search facets are UI components that allow users to filter search results based on specific criteria. In AEM Assets, these facets are typically based on metadata fields associated with assets.
Here are the steps to create a custom search facet in AEM Assets:
  • Navigate to Tools > General > Search Forms, you will see a list of forms.
  • For our use case, let' proceed with Assets Admin Search Rail form. This form is used to search for assets in the AEM Assets UI. When configuring the search form remember it's global across AEM Assets.AEM Assets Search Form
  • Select the Assets Admin Search Rail form and click on the Edit button. In the right panel, list of predicates are provided.AEM Assets Edit Search Form
  • Add a new predicate (e.g., Property predicate) from the Select Predicate section. This will add a new filter to the Asset Search UI. Configure the predicate by specifying the Property Name, Field Label, etc. The Property Name should match the metadata field you want to filter on. Need a custom metadata field? Read the article Custom Metadata in AEM Assets for step-by-step instructions.AEM Assets Property PredicateChoose the predicate type that best matches your requirements.
  • Save the changes to the search form. This will update the search UI to include the new facet.
Navigate to an Asset Folder and click on Search icon in the top right corner of the Assets UI. You should see the new facet you created in the search filter panel.AEM Assets Search Filter
Custom Search Facets can be found at /conf/global/settings/dam/search/facets/assets. You can incorporate this configs into your AEM codebase and deploy the changes to AEM instances. Ensure that you include the path in the filter.xml.

References

Write your Comment