Expand my Community achievements bar.

SOLVED

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

Avatar

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

Avatar

Correct answer by
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

Avatar

Employee

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

Avatar

Level 4

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

Avatar

Employee

Can you post your query builder query?

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

Avatar

Correct answer by
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. 

Avatar

Level 4

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

Avatar

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

Avatar

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