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

pankajg1611582 27-09-2018

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.

Accepted Solutions (1)

Accepted Solutions (1)

aneeta45259594 27-09-2018

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

Answers (4)

Answers (4)

pankajg1611582 27-09-2018

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.

Arun_Patidar
MVP
27-09-2018

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

]