Hi,
We are using QueryBuilder to do the search on our website.
We have a list of vanitys url's stored on a property called sling:vanityPath that is a multivalued property.
I want to put on the search criteria a restriction to search pages that contains some string on the vanity urls.
For example:
search pages that contains "en_us" on the property sling:vanityPath (that is a multivalued property).
Is it posible to do something like this?
I could not found anything similar on the internet, I appreciate any help.
Thank you very much in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Are you using SQL2? if yes, you can use below query
SELECT parent.* FROM [cq:Page] AS parent INNER JOIN [nt:base] AS child ON ISCHILDNODE(child,parent) WHERE ISDESCENDANTNODE(parent, '/content') AND child.[sling:vanityPath] IS NOT NULL
you can use child.[sling:vanityPath] LIKE 'en_us' also
if you are using Query Builder Debugger Tool, you can write like below:
type=nt:base
path:/content/
property:jcr:content/sling:vanityPath
property.operation:exists
you can use other property operation also e.g. "like" to search for particular keyword for vanity urls in properties
I am looking for another answers,
and if it is posible to put a condition to verify if a property exists on the parent page of this page, this is something I can use.
is this posible or easier of my first question???
I remain attentive.
Thank you!
Views
Replies
Total Likes
Are you using SQL2? if yes, you can use below query
SELECT parent.* FROM [cq:Page] AS parent INNER JOIN [nt:base] AS child ON ISCHILDNODE(child,parent) WHERE ISDESCENDANTNODE(parent, '/content') AND child.[sling:vanityPath] IS NOT NULL
you can use child.[sling:vanityPath] LIKE 'en_us' also
if you are using Query Builder Debugger Tool, you can write like below:
type=nt:base
path:/content/
property:jcr:content/sling:vanityPath
property.operation:exists
you can use other property operation also e.g. "like" to search for particular keyword for vanity urls in properties
Hi,
It works!
Thank you very much for the help!
Views
Replies
Total Likes
Views
Likes
Replies