Hi,
I need urgent help regarding search/query below. Below query is not working AEM 6.2, but the same query with [nt:base] is working fine.
Note: headingText - It is a property of the custom body copy component. Example path of this: /content/mysite/segment/mypage/jcr:content/lhs-parsys-rhs/body_copy_0
SELECT * FROM [cq:Page] AS s WHERE ISDESCENDANTNODE([/content/mysite/segment]) and CONTAINS(s.[headingText], 'investment'); - Not working in AEM 6.2
SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/mysite/segment]) and CONTAINS(s.[headingText], 'investment'); - Working in AEM 6.2
But, other queries to search for page properties on [cq:Page] are working properly (see below query). The problem is with queries containing component properties.
SELECT * FROM [cq:Page] AS s WHERE ISDESCENDANTNODE([/content/mysite/segment]) and CONTAINS(s.[jcr:content/author], 'John') - Working in AEM 6.2
Whereas if I give full path for the component property it is working fine. Below is the query:
SELECT * FROM [cq:Page] AS s WHERE ISDESCENDANTNODE([/content/mysite/segment]) and CONTAINS(s.[jcr:content/header-parsys/body_copy/headingText], 'investment') - Working in AEM 6.2
So, I tried to use regular expressions in the query. The query with regular expressions is working in AEM 6.0, but not in AEM 6.2
SELECT * FROM [cq:Page] AS s WHERE ISDESCENDANTNODE([/content/mysite/segment]) and CONTAINS(s.[jcr:content/*/*/headingText], 'investment') - Not working in AEM 6.2
SELECT * FROM [cq:Page] AS s WHERE ISDESCENDANTNODE([/content/mysite/segment]) and CONTAINS(s.[jcr:content/*/*/headingText], 'investment') - Working in AEM 6.0
But, the below query is working. I don't have "investment" value in any other place except "headingText" property.
SELECT * FROM [cq:Page] AS s WHERE ISDESCENDANTNODE([/content/mysite/segment]) and CONTAINS(s.[jcr:content/*], 'investment') - Working in AEM 6.2
I created the custom index to optimize the performance. Even I tried the above queries by deleting the custom index, thinking that it might be causing the problem. But even after deleting custom index the results are same.
Currently, I don,t have any indexes in AEM 6.2 except OOTB indexes.
Thanks in advance.
Views
Replies
Total Likes