Exclude Assets from AEM Dam Search based on metadata property | Community
Skip to main content
Level 2
May 23, 2026
Question

Exclude Assets from AEM Dam Search based on metadata property

  • May 23, 2026
  • 2 replies
  • 29 views

I want to exclude assets from AEM Dam search if value is set searchable=false.

can I do this by customizing damAssetLucene index. I can exclude a path from search but how can I do based on a property.

2 replies

Level 4
May 24, 2026

Hi ​@RinkiShahi,

 

You should not try to exclude the asset from the Lucene index itself just because searchable=false.

 

A cleaner approach is:

  1. Add the metadata property to your custom DAM Lucene index so it can be queried:

jcr:content/metadata/searchable

  1. Then update the DAM search query/predicate logic to exclude assets where this property is set to false.

 

For example, if you are using QueryBuilder, add a property predicate like:

property=jcr:content/metadata/searchable
property.operation=unequals
property.value=false

or design the query so only searchable assets are returned:

property=jcr:content/metadata/searchable
property.value=true

 

The safer enterprise pattern is:

  • keep the asset indexed
  • make the metadata property indexed/queryable
  • filter it at the search/query layer

 

Trying to conditionally remove assets from damAssetLucene based on metadata can create issues with reindexing, future metadata changes, and other DAM features that still expect the asset to be discoverable.

 

So the solution is not really “exclude from index”; it is “index the property and exclude it from search results using the query predicate.”

Level 2
May 24, 2026

Thanks ​@akhil_merupula for the response, but my use case is to exclude assets from Omni Search (AEM Assets Search UI) entirely if searchable is set to false. I do not have a separate query to run for this. 

Level 4
May 24, 2026

Hi ​@RinkiShahi,

 

Understood, for the Omni Search UI specifically, the way to handle this is by customizing the AEM Assets search predicate configuration, not the index itself.

 

You can overlay the search predicate at:
/libs/dam/gui/content/search/searchpanel/searchpredicates

 

Add a Hidden Predicate that always appends the filter:
property=jcr:content/metadata/searchable
property.value=true


This way every Omni Search query automatically includes 
the searchable=true filter without the user or a custom query needing to do anything, it becomes part of the default search behavior at the UI layer.

 

Steps:
1. Overlay the search configuration under /apps/dam/gui/content/search/searchpanel/searchpredicates
2. Add a property predicate node with:
   - property: jcr:content/metadata/searchable
   - value: true
   - operation: equals
3. Set the predicate as hidden so it is always applied without being visible to the user


This is the cleanest approach for your use case, no index modification needed, and it works globally across all Omni Search queries automatically.

 

Hope this helps!