Asset share commons search results | Community
Skip to main content
Level 2
April 2, 2024
Solved

Asset share commons search results

Hi All,

 

I am working on search results component in asset share commons, which currently searches for dam:Asset only. I have a requirement to override the OOTB behaviour to search dam:asset as well as sling:folder. Can anybody help to proceed on this ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
EstebanBustamante
EstebanBustamanteAccepted solution
New Participant
April 2, 2024

Hi, 

Please take a look at QuerySearchPreProcessor, here is an example of how to use it: https://suman-shekhar.medium.com/query-search-preprocessor-customization-04cb55adfa60.

Another alternative is to extend the search functionality from here: https://github.com/adobe/asset-share-commons/blob/develop/core/src/main/java/com/adobe/aem/commons/assetshare/search/providers/impl/QuerySearchProviderImpl.java 

 

Hope this helps

Esteban Bustamante

5 replies

arunpatidar
New Participant
April 8, 2024

Hi @ayushag3 

Were the user suggestions helpful? Let us know if more details are needed or mark the answer as correct. If you found a solution independently, please share it with the community.

Translate
Arun Patidar
AyushAg3Author
Level 2
April 9, 2024

Yes Arun. This can be marked as the correct answer. It worked.

Translate
kautuk_sahni
Employee
June 7, 2024

@ayushag3 I hope the AEM community has been helpful. We look forward to your return as either a learner or a contributor. The community grows with SMEs like you. Invite your AEM peers to contribute too. Happy AEM learning!

Translate
Kautuk Sahni
EstebanBustamante
EstebanBustamanteAccepted solution
New Participant
April 2, 2024

Hi, 

Please take a look at QuerySearchPreProcessor, here is an example of how to use it: https://suman-shekhar.medium.com/query-search-preprocessor-customization-04cb55adfa60.

Another alternative is to extend the search functionality from here: https://github.com/adobe/asset-share-commons/blob/develop/core/src/main/java/com/adobe/aem/commons/assetshare/search/providers/impl/QuerySearchProviderImpl.java 

 

Hope this helps

Translate
Esteban Bustamante
AyushAg3Author
Level 2
April 3, 2024

Hi @estebanbustamante , I have overriden the QuerySearchPreProcessor to modify the search query. This works. But by doing this I path format has changed due to which I need to override search results component to support the new structure. How can we achieve this ? Any suggestion ?

Translate