AEM Preicate query with cq: tags
I am trying to get article pages tagged with only specified cq: tags. I Followed following documentation and ACS Commons Git references.
When I execute query in predicate query console it works fine. It returns me only articles only with required tags.where as when I run query in java code. I get search results of all pages.
Please advise which I am missing.
path=/content/apples/en
type=cq:Page
property=@jcr:content/sling:resourceType
property.value=apples/components/page/article
tagid.property=jcr:content/cq:tags
tagid.1_value=namespace-a:some/tag
tagid.2_value=namespace-a:some/other/tag
orderby=@jcr:content/date
orderby.sort=desc
p.offset=0
p.limit=-1
// Tag Predicate - this has been moved into an impl package so Javadocs are not generated for it.
map.put("tagid.property", "jcr:content/cq:tags"); // Default is 'cq:tags'
map.put("tagid.1_value", "namespace-a:some/tag"); // Note the #_ prefix for values is required.
map.put("tagid.2_value", "namespace-a:some/other/tag");
Thank You