cq:PageContent not getting retrieved | Community
Skip to main content
Level 4
October 6, 2020
Solved

cq:PageContent not getting retrieved

  • October 6, 2020
  • 3 replies
  • 1872 views

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..?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Vijayalakshmi_S

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

3 replies

Mayukh007Author
Level 4
October 6, 2020
we are in AEM 6.5.5
Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
October 6, 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

Mayukh007Author
Level 4
October 6, 2020

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

Manjunath_K
Level 7
October 7, 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.

 

 

 

-Manjunath