Issue in fetching results using Query Builder Debugger | Community
Skip to main content
Adobe Employee
March 10, 2023
Solved

Issue in fetching results using Query Builder Debugger

  • March 10, 2023
  • 1 reply
  • 578 views

Hi, I was using the Query Builder Debugger and tried to fetch the results for the OOTB site (we-retail) using the below query:

path=/content/we-retail type=nt:unstructured path.flat=true p.limit=-1

But then I am getting 2 results which are shown below-

where the 1st result is NOT of type="nt:unstructured" and it is of type="cq:PageContent" while the 2nd result is of correct type (i.e - nt:unstructured).
Can anyone help me with this issue?

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 lukasz-m

Hi @vikas3,

This is correct behavior. If you will go to official documentation Query Builder Predicate Reference, and check what type predicate does, you will find definition like this:

As you can see path predicate will also include all the suptypes and cq:PageContent is a subtype of nt:unstructured. This is why it's included in the results.

You can check the definition of cq:PageContent and other types under:

This should give you a clear idea what you can expect in terms of using path predicate with specific types.

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
March 10, 2023

Hi @vikas3,

This is correct behavior. If you will go to official documentation Query Builder Predicate Reference, and check what type predicate does, you will find definition like this:

As you can see path predicate will also include all the suptypes and cq:PageContent is a subtype of nt:unstructured. This is why it's included in the results.

You can check the definition of cq:PageContent and other types under:

This should give you a clear idea what you can expect in terms of using path predicate with specific types.