I have an requirement where i need to search for a string under a path for equal operation rather than contains?
For eg. I want to search all nodes having string Pankaj under /content/Site. And, there are two nodes:
1. /content/Site/Node1 having a property whose value is Pankaj
2. /content/Site/Node2 having a property whose value is PankajGirtotra
So output should be /content/Site/Node1 only.
Solved! Go to Solution.
Hello pankajg1611582
The following query structure should work for you
select * from [cq:PageContent] as s where isdescendantnode([/content/we-retail]) AND s.[*] = "Pankaj"
Best Regards,
Aneet Arora
Yes, You can do it:
QueryBuilder Debugger - http://localhost:4502/libs/cq/search/content/querydebug.html
path=/content/Site
property=propertyName
property.value=Pankaj
p.limit=-1
SQL2
SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE(s,'/content/Site') AND s.[propertyName] = 'Pankaj'
XPATH
/jcr:root/content/Site//*
[
(@propertyName = 'Pankaj')
]
Views
Replies
Total Likes
Here you are searching for specific property. And my Issue is, i don't know the property on which that value could present. It could be present on any property. So, its like fulltext but with equal operation.
Views
Replies
Total Likes
QueryBuilder Debugger - http://localhost:4502/libs/cq/search/content/querydebug.html
path=/content/Site
fulltext=Pankaj
p.limit=-1
Views
Replies
Total Likes
Hello pankajg1611582
The following query structure should work for you
select * from [cq:PageContent] as s where isdescendantnode([/content/we-retail]) AND s.[*] = "Pankaj"
Best Regards,
Aneet Arora
Thanks, it worked.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies