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

jcr-sql2 query starting with specific string

Avatar

Level 4

Hello Team,

In the jcr-sql2 query, is there any way to query the property having the value starts with certain string. 

I have overlapping tags, business:Finance, business:Insurance and global_search_business:Finance, global_search_business:Insurance. I want to only query the content tagged with all business: tags(but not global_search_business: tags).

SELECT * FROM [cq:PageContent] as node WHERE ISDESCENDANTNODE(node, '/content/geometrixx/en/news') AND CONTAINS([cq:tags], "business:") returning the content tagged with both.

I tried CONTAINS([cq:tags], "^business:"), its giving syntax error.

Even I tried LIKE, but no success.

Any suggestions please?

Best Regards,

Durga

3 Replies