Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Setting Default DAM Path in Global/Omnisearch & Issue with Asset Admin Search Path


Level 2

Hello Adobe Community,


I'm currently working with the Global/Omnisearch and Assets Admin Search features in AEM as a Cloud Service. I'm facing two primary challenges:


  1. Global/OmniSearch Default Path: I aim to set a default DAM path for the Global/Omnisearch. By default, I'd like the search results to be limited to a specific folder (e.g., `/content/dam/we-retail`). While users should initially only see results from this folder, I also want to give them the flexibility to subsequently search other folders via the Assets Admin Search by adjusting filters. Is there a way to set this default path for Global/Omnisearch?
  2. Assets Admin Search Path Modification: I tried to modify the default search path of the Assets Admin Search from `/content/dam` to `/content/dam/we-retail`. However, even after making this change, it appears to continue searching under the `/content/dam` path. Has anyone encountered this issue? Any guidance on why this might be happening and how to fix it would be appreciated.

Thank you for your insights and assistance!


@arunpatidar @EstebanBustamante 


Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies


Community Advisor


you need to overly to add custom rootpath. for example to set the custom path when you serach assets during the edit page




Arun Patidar


Level 2

Thank you for your reply @arunpatidar 


But I wasn't referring to the asset search within the Sites editor. My focus in Point 2 was on the Asset Search within the DAM, accessed via the search icon in the AEM Header. This search provides configurable forms for setting filters and predicates. My aim was to modify the default search path to target a specific folder within the DAM. Ideally, when users initiate an asset search, they should prioritize this folder. However, even after updating the path in the search forms, the changes aren't reflected during actual asset searches. I've attached screenshots for your reference.


1. Asset Admin Search Form



2. Search Assets within Assets


3. Searching Assets and the path value remained the same. But it should have updated to /content/dam/wknd



And the same thing I am trying to update when we are searching the assets from the AEM Welcome Page.


Here in this case, I am only expecting the search results from the /content/dam/wknd folder, for which I checked the omnisearch.js on the given path: /libs/granite/ui/components/shell/clientlibs/shell/js/omnisearch/omnisearch.js
but it seems that it's a fulltext search and there's no path defined in the JS nor anywhere in the Nodes.



So, I wanted to understand, is it even possible to achieve this? or simply can't be done. 




Level 2

Hi @arunpatidar , could you please check out the above response and confirm if it's possible anyhow or not?


Community Advisor

You can try updating(overriding) the default assets path here


Arun Patidar