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

Is there any way to use fulltext for equal operator rather than contains?

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 5

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

View solution in original post

5 Replies

Avatar

Community Advisor

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')

]



Arun Patidar

Avatar

Level 2

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.

Avatar

Community Advisor

QueryBuilder Debugger - http://localhost:4502/libs/cq/search/content/querydebug.html

path=/content/Site

fulltext=Pankaj

p.limit=-1



Arun Patidar

Avatar

Correct answer by
Level 5

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