Développer ma barre des réalisations de la Communauté.

RÉSOLU

AEM Querybuilder search on the asset name

Avatar

Level 3

Hi there,

 

I need to perform a search through Querybuilder on AEM 6.5 leveraging on the asset name.
The search must be 

  • partial
  • case insensitive

I have already tried on the node name concatenating %25 at the beginning of my partial value searched and * at the end but it doesn't work.


Thank you,
Serena

1 solution acceptée

Avatar

Réponse correcte par
Community Advisor

@serenapitotti : For partial match, you can use 'like' operation. For eg:-

path=/content
type=cq:Page
1_property=jcr:title
1_property.value=Fra%
1_property.operation=like

For case-insesntive, you can try with: 

property.operation=equalsIgnoreCase 

For more info, you can refer this cheat-sheet: https://experienceleague.adobe.com/docs/experience-manager-65/assets/JCR_query_cheatsheet-v1.1.pdf?l...

https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md

thanks.

Voir la solution dans l'envoi d'origine

5 Replies

Avatar

Réponse correcte par
Community Advisor

@serenapitotti : For partial match, you can use 'like' operation. For eg:-

path=/content
type=cq:Page
1_property=jcr:title
1_property.value=Fra%
1_property.operation=like

For case-insesntive, you can try with: 

property.operation=equalsIgnoreCase 

For more info, you can refer this cheat-sheet: https://experienceleague.adobe.com/docs/experience-manager-65/assets/JCR_query_cheatsheet-v1.1.pdf?l...

https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md

thanks.

Avatar

Level 3

Unfortunately it's not working.

Avatar

Community Advisor

@serenapitotti : If you want to search using asset name, there is support to search using nodename. Please refer: https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md

nodenameThis is used to search exact nodenames for the result set. It allows few wildcards like: nodename=text, will search for any character or no character after text. nodename=text? will search for any character after text.

If this doesn't work, give me your query and exact use-case and I can try at my end to see what would work for that.
thanks.

Avatar

Level 3

I have already tried with nodename=%25myText%25
It allows partial search but it's case sensitive. My goal is to perform a partial and case-insensitive search.
 

Avatar

Community Advisor

@serenapitotti: I think the case insensitive might not work with nodename.
I couldn't find any documentation to confirm that but if you think about it, it is a unique name and mostly nodename would be in lower-case.