Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
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.