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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

QueryBuilder Query for page with tags is giving 0 results in publish instance.

sureshy2015
Level 4
Level 4

Hi.

When I query for other page properties I am getting results and when I do a query for pages tagged with any tag I am getting 0 results even though there are pages tagged with tags.Please let me know how can I debug on this?

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

If the same content is on both Auth and Pub - the query will return the same result set. If there are 0 results - look at the content in CRXDE lite and make sure the nodes are present in Pub. 

View solution in original post

7 Replies
Graham_Hutchin1
Employee
Employee

As a first step,  Is your tag published/activated? If not your query will not return any results.

sureshy2015
Level 4
Level 4

Thanks for the reply.yes, tags are present in publish environment.

Graham_Hutchin1
Employee
Employee

Can you post your query builder query?

For Example:
type=cq:Page
tagid=Test:test
tagid.property=jcr:content/cq:tags

smacdonald2008
Correct answer by
Level 10
Level 10

If the same content is on both Auth and Pub - the query will return the same result set. If there are 0 results - look at the content in CRXDE lite and make sure the nodes are present in Pub. 

View solution in original post

sureshy2015
Level 4
Level 4

yes tags are present and pages are there with tagged.I am not getting results even for geometrixx tags

sureshy2015
Level 4
Level 4

Graham Hutchinson wrote...

Can you post your query builder query?

For Example:
type=cq:Page
tagid=Test:test
tagid.property=jcr:content/cq:tags

 

 

fulltext=geo
type=cq:page
property=jcr:content/cq:tags
property.value=geometrixx-outdoors:activity/biking

Graham_Hutchin1
Employee
Employee

sureshy2015 wrote...

Graham Hutchinson wrote...

Can you post your query builder query?

For Example:
type=cq:Page
tagid=Test:test
tagid.property=jcr:content/cq:tags

 

 

fulltext=geo
type=cq:page
property=jcr:content/cq:tags
property.value=geometrixx-outdoors:activity/biking

 

I went to the query debugger (/libs/cq/search/content/querydebug.html) and didn't get any results myself.  I see a couple things that you need to adjust:

1. Type should be cq:Page.  This is case sensitive.
2. Personally I like to use tagid and tagid.property instead of property and property.value. You can still use property if you like.
3. Be careful with the fulltext search as well because it appears to be excluding results.  I didnt get any results with "geo" but when I enter another value such as "Biking" I get results.

Examples that return results:
type=cq:Page
tagid=geometrixx-outdoors:activity/biking
tagid.property=jcr:content/cq:tags
fulltext=biking

 

type=cq:Page
tagid=geometrixx-outdoors:activity/biking
tagid.property=jcr:content/cq:tags