Expand my Community achievements bar.

SOLVED

Issue in fetching results using Query Builder Debugger

Avatar

Employee

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-

vikas3_0-1678432784318.png

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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:

qb-type.png

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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:

qb-type.png

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.