Tags Filter Component

  • Component title: Tags Filter
  • Component group: Asset Share Commons - search
  • Released with version 1.0.0
  • Last updated in version 1.6.0

Tags filter component

The Tags Filter component displays controls that allow an end-user to refine search’s based on AEM Tags assigned to the assets.

Note this component only matches on exact tags and does NOT match on descendant tags.

Authoring

Dialog / Filter tab

Tags filter dialog

Type

The form controls to display for this filter.

  • Checkboxes (Multi select)
  • Radio buttons (Single select)
  • Slider (Single select)
  • Toggle (Single select)

Title

Label for the filter.

Tags Property

List of Asset metadata properties available for filtering.

  • Labels/Properties are derived from available Metadata Schemas
  • Lightning icon (⚡) indicates this property is optimized for search.
  • Turtle icon (🐢) indicates this property is NOT optimized for search.

Operation

The search operation to perform between the Metadata Property and Option(s).

  • Equals
    • Metadata property exactly matches value
  • Does not equals
    • Metadata property does not matches value

Start Expanded

Select to initially render the component filter in an expanded mode, showing the selection options.

Tags Display Order (v.

Defines the order the tags are displayed to the end-user

  • Natural
    • Order determined by AEM
  • Alphabetical
    • Alphabetical by Tag title (Ascending; A-Z)

Tags

Defines the tags that can be filtered against.

Dialog / Search Behavior tab

Search Behavior dialog

Auto-Search on Change (v1.3.0)

Select to automatically trigger as search any time the selected value changes.

Specifies if the component’s view should be refreshed after each search.

  • Never
    • The Default value.
    • Do not replace the view of the component on search.
    • Typically set to Never unless the search options vary based on the current search state.
  • Replace
    • Replace the view of the component on search.

Technical details

  • Component: /apps/asset-share-commons/components/search/tags
  • Sling Model: com.adobe.aem.commons.assetshare.search.predicates.impl.TagsPredicateImpl

This filter implements a wrapped version of AEM Query Builder’s JcrPropertyPredicateEvaluator. The Asset Share Commons’ provided predicate wrapper (com.adobe.aem.commons.assetshare.search.impl.predicateevaluators.PropertyValuesPredicateEvaluator) allows for the values to be provided as comma-delimited values to be transformed into #_value parameters for evaluation by AEM’s JcrPropertyPredicateEvaluator;

Example generated Query Builder predicate output:

1_group.propertyvalues.property=./jcr:content/metadata/cq:tags
1_group.propertyvalues.operation=equals
1_group.propertyvalues.1_values=we-retail:activity/surfing
1_group.propertyvalues.2_values=we-retail:activity/swimming