Hi Team,
I have tag1, tag2, tag3 and tag4. I need the pages which don't have tag4.
Example:
Page 1 has cq:tags=[tag1, tag2]
Page 2 has cq:tags=[tag1, tag4]
In this case, I need only "Page 1" as output but not "Page 2" as it contains tag4.
I used the below query -
path=/content/geometrixx
type=cq:Page
property=jcr:content/cq:tags
property.operation=unequals
property.value=tag4
But it is displaying both the results because Page 2 contains tag1 which is not equal to tag4 which is true. It is displaying even if there is one match (i.e. not equals to tag4 results true for tag1). I need the pages which do not have tag4 at all.
Any idea? Please help me in this.
Thanks,
AryA.
Solved! Go to Solution.
Hi Arya,
See if the below query works for you.
path=/content/geometrixx
type=cq:Page
group.p.not=true
group.property=jcr:content/cq:tags
group.property.operation=equals
group.property.value=tag4
I am not sure you can set a query for this exact match - what you may need to do is setup a query looking for the tags and then iterate over result set to exclude pages with this tags.
Views
Replies
Total Likes
Hi Arya,
See if the below query works for you.
path=/content/geometrixx
type=cq:Page
group.p.not=true
group.property=jcr:content/cq:tags
group.property.operation=equals
group.property.value=tag4
Hi Lokesh,
It's working.
Thanks a lot,
AryA.
Views
Replies
Total Likes
Yes Scott. We thought of doing this way. But if there is more content, I'm suspecting like there might be performance issues because of this. Thanks
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies