Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

cq:PageContent not getting retrieved

Avatar

Avatar
Contributor
Level 3
Mayukh007
Level 3

Likes

15 likes

Total Posts

88 posts

Correct Reply

2 solutions
Top badges earned
Contributor
Validate 1
Shape 1
Ignite 1
Give Back 5
View profile

Avatar
Contributor
Level 3
Mayukh007
Level 3

Likes

15 likes

Total Posts

88 posts

Correct Reply

2 solutions
Top badges earned
Contributor
Validate 1
Shape 1
Ignite 1
Give Back 5
View profile
Mayukh007
Level 3

06-10-2020

HI,

 

Suddenly we are not getting any result for SQL2 query like this:

select * from [cq:PageContent] as data WHERE ISDESCENDANTNODE(data,'/content/experience-fragments/')

 

whereas this works and return nodes:

select * from [cq:Page] as data WHERE ISDESCENDANTNODE(data,'/content/experience-fragments/')

 

I created cq:PageContent under experience-fragment folder but still no luck..did re-index cq:PageLucene as well.

 

Any pointer..?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

564 likes

Total Posts

706 posts

Correct Reply

234 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

564 likes

Total Posts

706 posts

Correct Reply

234 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

06-10-2020

Hi @Mayukh007,

I could see it working in 6.5.0. Couldn't check with SP5

As a first step, can you try to execute the below query predicate set in querydebug.html(http://localhost:4502/libs/cq/search/content/querydebug.html) and also in Explain Query (Tools -> Operations -> Diagnosis -> Query Performance)

 

path=/content/experience-fragments
type=cq:PageContent
p.limit=-1

 

 Still no clue, create a logger for following in Sling -> Log support in Felix console (http://localhost:4502/system/console/slinglog)-> Execute the query again and share the details from log

org.apache.jackrabbit.oak.query.QueryEngineImpl
org.apache.jackrabbit.oak.query.SQL2Parser
org.apache.jackrabbit.oak.query.QueryImpl
com.day.cq.search
org.apache.jackrabbit.oak.query

Mayukh007

Thank you for the suggestion.

I tried above steps but still clueless. One more thing, it only does not work for under /content/experience-fragment folder.

So here is what is working and what is not:

select * from [cq:PageContent] as data WHERE ISDESCENDANTNODE(data,'/content/experience-fragments/') = no result

select * from [nt:unstructured] as data WHERE ISDESCENDANTNODE(data,'/content/experience-fragments/') = gives result

select * from [cq:PageContent] as data WHERE ISDESCENDANTNODE(data,'/content/') = gives result too

select * from [cq:PageContent] as data WHERE CONTAINS([cq:tags],"cm-travel:XFTYPE/FAMILYDEP") AND ISDESCENDANTNODE(data,'/content/experience-fragments') AND [sling:resourceType] = "core/wcm/components/page/v1/page" = this works as well

Vijayalakshmi_S

Hi @Mayukh007,

I could spot one trivial difference between your working query and the one doesn't works. It really didn't matter when I tried from my instance.

Given that it is not working for you anyway, I suggest you to try this

  • Remove "/" after experience-fragments and try. The other working query with check on cq:tags along with experience fragments check that you mentioned is not having the same. 
  • select * from [cq:PageContent] as data WHERE ISDESCENDANTNODE(data,'/content/experience-fragments')  

Still no clue,

  • Share screenshot of CRXDE view of /content/experience-fragments path if possible
  • Observe and share log details while executing this query.
  • Hope you are trying this with admin access. (Should be, as your last query works. Just to mention as one of the possible reason)
Mayukh007
Thank you again for the suggestions. I actually found that the issue is in new custom oak index we added...So I think we are good now, I need to debug the index to find root cause.
Vijayalakshmi_S
With OOB set up, this query is a traversal query. Given that you have used custom oak index definition + with results of working and not working query, check for path related properties added as part of custom index definition. (Could relate now with query results that you posted - first and last query)
Mayukh007
yes, the custom index did not have the path we were searching in that query. Will check by adding that in that custom query. Currently this SQL2 query not using any custom index.

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 3
MVP
Manjunath_K
MVP

Likes

140 likes

Total Posts

188 posts

Correct Reply

61 solutions
Top badges earned
Give Back 3
Give Back
Boost 50
Boost 5
Boost 3
View profile

Avatar
Give Back 3
MVP
Manjunath_K
MVP

Likes

140 likes

Total Posts

188 posts

Correct Reply

61 solutions
Top badges earned
Give Back 3
Give Back
Boost 50
Boost 5
Boost 3
View profile
Manjunath_K
MVP

06-10-2020

@Mayukh007 

Below query provides expected result on AEM 6.5, can you please check error log when this query returns no result for you & also if possible share some screenshot of no result.

 

query-sql.PNG

 

query-debug.PNG

 

-Manjunath