Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Searching pages for more than one tag values

Avatar

Former Community Member

Hi,

I am using CQ 5.6.1 and want to search pages that are tagged to more than one values of tags. For example: I want to search all the pages that are tagged to:

topicId=investment and language=english and type = something

I can do it for single value of tag like

        //searchMap.put(tagid, topicId);
        //searchMap.put(tagid.property, @jcr:content/cq:tags);

How can I implement it for more than one values of tags.

Thanks

Ankit

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

This issue has resolved by using:

searchMap.put("type", "cq:Page"); searchMap.put("1_tagid", topicId); searchMap.put("1_tagid.property", "jcr:content/cq:tags"); searchMap.put("2_tagid", anothertopicId); searchMap.put("2_tagid.property", "jcr:content/cq:tags");

 

Ankit

View solution in original post

3 Replies

Avatar

Correct answer by
Former Community Member

This issue has resolved by using:

searchMap.put("type", "cq:Page"); searchMap.put("1_tagid", topicId); searchMap.put("1_tagid.property", "jcr:content/cq:tags"); searchMap.put("2_tagid", anothertopicId); searchMap.put("2_tagid.property", "jcr:content/cq:tags");

 

Ankit

Avatar

Level 2

I was also looking this, but I also want to control logical and/or for the multiple tag values. Also the normal tagid property takes into account merged tags, this one does not appear to do that. Any ideas?

Avatar

Level 10

Nice work