Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How to exclude search results based on a sub path - Path LIKE

Avatar

Level 2

Hello Friends,

I want to get all dam assets but not subassets. Subassets are also of same type as assets i.e. dam:Asset.

Is there a way to have a wild card (or LIKE operation) in case of the path predicate?

path=/content/dam
type=dam:Asset
p.limit=-1

group.p.not=true
group.1_path.operation=like
group.1_path=%subassets%

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 2

@Tuhin

Thanks for your response. No specific property on subassets. 

We were able to do that anyways....here's how we did it:

property=../../jcr:content/jcr:primaryType
property.operation=unequals
property.value=dam:AssetContent

If a dam:Asset node has its parent as dam:AssetContent, then its a subasset.

View solution in original post

3 Replies

Avatar

Level 7

Is there any certain property present in your sub-assets?

Avatar

Correct answer by
Level 2

@Tuhin

Thanks for your response. No specific property on subassets. 

We were able to do that anyways....here's how we did it:

property=../../jcr:content/jcr:primaryType
property.operation=unequals
property.value=dam:AssetContent

If a dam:Asset node has its parent as dam:AssetContent, then its a subasset.

Avatar

Level 7

RS SH wrote...

@Tuhin

Thanks for your response. No specific property on subassets. 

We were able to do that anyways....here's how we did it:

property=../../jcr:content/jcr:primaryType
property.operation=unequals
property.value=dam:AssetContent

If a dam:Asset node has its parent as dam:AssetContent, then its a subasset.

 

Thats why I wanted to know the type. Cheers.