Hi Team,
I need to execute a query which has to support both like operation and equalsignorecase
path=/content/
type=cq:Page
property=jcr:content/jcr:title
property.value=%Construction%
property.operation=like
But I'm able to use only like operation and equalsIgnorecase separately i need both like and equlsignorecase in the same query.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Keerthi0555
You can do that using an Xpath query like this
/jcr:root/content/abc//element(*, cq:Page)
[
(jcr:like(fn:lower-case(jcr:content/@jcr:title), '%Construction%'))
]
Hi @Keerthi0555
QueryBuilder does not support equal ignore case, better to create custom predicate
However the query with equal and like can be constructed like below:
path=/content/aemlab
type=cq:Page
group.1_property=jcr:content/jcr:title
group.1_property.value=%Construction%
group.1_property.operation=like
group.2_property=jcr:content/jcr:title
group.2_property.value=%Construction%
group.2_property.operation=equals
group.p.or=true
Custom Predicate Example : https://github.com/arunpatidar02/aemaacs-aemlab/blob/master/core/src/main/java/com/community/aemlab/...
Hi @Keerthi0555
You can do that using an Xpath query like this
/jcr:root/content/abc//element(*, cq:Page)
[
(jcr:like(fn:lower-case(jcr:content/@jcr:title), '%Construction%'))
]
Views
Likes
Replies
Views
Likes
Replies