Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

QueryBuilder API: How to query like operations in case insensetive manner?

Avatar

Level 5

I have a query like this:

type=nt:unstructured
path=/content/dam/articles
nodename=master
group.p.or=true
group.1_property=title
group.1_property.value=%article
group.1_property.operation=like

...

for group's `1_property` I want to search without case senstivity, how can I achieve the same? I am on AEM 6.5

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

You may need to write a custom Predicate to achieve it. please refer to following example - https://blogs.perficient.com/2020/11/11/case-insensitive-queries-with-the-aem-query-builder/

 

For like operation xpath would be something like this - 

/jcr:root/content/dam/wknd/en//*[(jcr:like(fn:lower-case(@property),'value%'))]

Make changes to example code accordingly.   

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

You may need to write a custom Predicate to achieve it. please refer to following example - https://blogs.perficient.com/2020/11/11/case-insensitive-queries-with-the-aem-query-builder/

 

For like operation xpath would be something like this - 

/jcr:root/content/dam/wknd/en//*[(jcr:like(fn:lower-case(@property),'value%'))]

Make changes to example code accordingly.